mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-26 21:39:43 +02:00
style: fix formatting issues
This commit is contained in:
parent
3c40c6e365
commit
c65cda24d7
7 changed files with 39 additions and 28 deletions
|
|
@ -41,12 +41,12 @@ import { useMessagesElectric } from "@/hooks/use-messages-electric";
|
|||
// import { WriteTodosToolUI } from "@/components/tool-ui/write-todos";
|
||||
import { getBearerToken } from "@/lib/auth-utils";
|
||||
import { createAttachmentAdapter, extractAttachmentContent } from "@/lib/chat/attachment-adapter";
|
||||
import { convertToThreadMessage } from "@/lib/chat/message-utils";
|
||||
import {
|
||||
isPodcastGenerating,
|
||||
looksLikePodcastRequest,
|
||||
setActivePodcastTaskId,
|
||||
} from "@/lib/chat/podcast-state";
|
||||
import { convertToThreadMessage } from "@/lib/chat/message-utils";
|
||||
import {
|
||||
appendMessage,
|
||||
type ChatVisibility,
|
||||
|
|
@ -111,7 +111,6 @@ function extractMentionedDocuments(content: unknown): MentionedDocumentInfo[] {
|
|||
return [];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Tools that should render custom UI in the chat.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -115,13 +115,13 @@ import type {
|
|||
Membership,
|
||||
UpdateMembershipRequest,
|
||||
} from "@/contracts/types/members.types";
|
||||
import type { PermissionInfo } from "@/contracts/types/permissions.types";
|
||||
import type {
|
||||
CreateRoleRequest,
|
||||
DeleteRoleRequest,
|
||||
Role,
|
||||
UpdateRoleRequest,
|
||||
} from "@/contracts/types/roles.types";
|
||||
import type { PermissionInfo } from "@/contracts/types/permissions.types";
|
||||
import { invitesApiService } from "@/lib/apis/invites-api.service";
|
||||
import { rolesApiService } from "@/lib/apis/roles-api.service";
|
||||
import { trackSearchSpaceInviteSent, trackSearchSpaceUsersViewed } from "@/lib/posthog/events";
|
||||
|
|
@ -980,11 +980,7 @@ function RolesTab({
|
|||
>
|
||||
{/* Create Role Button / Section */}
|
||||
{canCreate && !showCreateRole && (
|
||||
<motion.div
|
||||
initial={{ opacity: 0 }}
|
||||
animate={{ opacity: 1 }}
|
||||
className="flex justify-end"
|
||||
>
|
||||
<motion.div initial={{ opacity: 0 }} animate={{ opacity: 1 }} className="flex justify-end">
|
||||
<Button onClick={() => setShowCreateRole(true)} className="gap-2">
|
||||
<Plus className="h-4 w-4" />
|
||||
Create Custom Role
|
||||
|
|
@ -1701,15 +1697,18 @@ function CreateRoleSection({
|
|||
);
|
||||
}, []);
|
||||
|
||||
const applyPreset = useCallback((presetKey: keyof typeof ROLE_PRESETS) => {
|
||||
const preset = ROLE_PRESETS[presetKey];
|
||||
setSelectedPermissions(preset.permissions);
|
||||
if (!name.trim()) {
|
||||
setName(preset.name);
|
||||
setDescription(preset.description);
|
||||
}
|
||||
toast.success(`Applied ${preset.name} preset`);
|
||||
}, [name]);
|
||||
const applyPreset = useCallback(
|
||||
(presetKey: keyof typeof ROLE_PRESETS) => {
|
||||
const preset = ROLE_PRESETS[presetKey];
|
||||
setSelectedPermissions(preset.permissions);
|
||||
if (!name.trim()) {
|
||||
setName(preset.name);
|
||||
setDescription(preset.description);
|
||||
}
|
||||
toast.success(`Applied ${preset.name} preset`);
|
||||
},
|
||||
[name]
|
||||
);
|
||||
|
||||
const getCategoryStats = useCallback(
|
||||
(category: string) => {
|
||||
|
|
@ -1857,10 +1856,7 @@ function CreateRoleSection({
|
|||
const perms = groupedPermissions[category] || [];
|
||||
|
||||
return (
|
||||
<div
|
||||
key={category}
|
||||
className="rounded-lg border bg-card overflow-hidden"
|
||||
>
|
||||
<div key={category} className="rounded-lg border bg-card overflow-hidden">
|
||||
{/* Category Header */}
|
||||
<div
|
||||
className={cn(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue