diff --git a/surfsense_web/components/assistant-ui/thread.tsx b/surfsense_web/components/assistant-ui/thread.tsx index 243b3f7cb..b7a5bcf0e 100644 --- a/surfsense_web/components/assistant-ui/thread.tsx +++ b/surfsense_web/components/assistant-ui/thread.tsx @@ -21,10 +21,10 @@ import { DownloadIcon, Plus, RefreshCwIcon, + Settings2, SquareIcon, Unplug, Upload, - Wrench, X, } from "lucide-react"; import { useParams } from "next/navigation"; @@ -55,6 +55,7 @@ import { currentUserAtom } from "@/atoms/user/user-query.atoms"; import { AssistantMessage } from "@/components/assistant-ui/assistant-message"; import { ChatSessionStatus } from "@/components/assistant-ui/chat-session-status"; import { ConnectorIndicator } from "@/components/assistant-ui/connector-popup"; +import { useDocumentUploadDialog } from "@/components/assistant-ui/document-upload-popup"; import { InlineMentionEditor, type InlineMentionEditorRef, @@ -73,16 +74,16 @@ import { type DocumentMentionPickerRef, } from "@/components/new-chat/document-mention-picker"; import type { ThinkingStep } from "@/components/tool-ui/deepagent-thinking"; -import { useDocumentUploadDialog } from "@/components/assistant-ui/document-upload-popup"; import { Avatar, AvatarFallback, AvatarGroup } from "@/components/ui/avatar"; import { Button } from "@/components/ui/button"; +import { Drawer, DrawerContent, DrawerHandle, DrawerTitle } from "@/components/ui/drawer"; import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, } from "@/components/ui/dropdown-menu"; -import { Popover, PopoverAnchor, PopoverContent, PopoverTrigger } from "@/components/ui/popover"; +import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover"; import { Switch } from "@/components/ui/switch"; import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip"; import { getConnectorIcon } from "@/contracts/enums/connectorIcons"; @@ -612,24 +613,21 @@ const ComposerAction: FC = ({ isBlockedByOtherUser = false
{!isDesktop ? ( <> - - - - - - + + + setToolsPopoverOpen(true)}> - + Manage Tools openUploadDialog()}> @@ -638,62 +636,51 @@ const ComposerAction: FC = ({ isBlockedByOtherUser = false - e.preventDefault()} - > -
- Agent Tools - - {enabledCount}/{agentTools?.length ?? 0} enabled - -
-
- {agentTools?.map((tool) => { - const isDisabled = disabledTools.includes(tool.name); - return ( -
- - {formatToolName(tool.name)} - - toggleTool(tool.name)} - className="shrink-0 scale-[0.6]" - /> + + + +
+ Agent Tools + + {enabledCount}/{agentTools?.length ?? 0} enabled + +
+
+ {agentTools?.map((tool) => { + const isDisabled = disabledTools.includes(tool.name); + return ( +
+ + {formatToolName(tool.name)} + + toggleTool(tool.name)} + className="shrink-0" + /> +
+ ); + })} + {!agentTools?.length && ( +
+ Loading tools...
- ); - })} - {!agentTools?.length && ( -
- Loading tools... -
- )} -
- - - + )} +
+ + + ) : ( @@ -707,7 +694,7 @@ const ComposerAction: FC = ({ isBlockedByOtherUser = false aria-label="Manage tools" data-joyride="connector-icon" > - +