diff --git a/surfsense_web/components/assistant-ui/thread.tsx b/surfsense_web/components/assistant-ui/thread.tsx index ad6d461e1..1188ed32a 100644 --- a/surfsense_web/components/assistant-ui/thread.tsx +++ b/surfsense_web/components/assistant-ui/thread.tsx @@ -77,6 +77,7 @@ import { DropdownMenuTrigger, } from "@/components/ui/dropdown-menu"; import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover"; +import { Skeleton } from "@/components/ui/skeleton"; import { Switch } from "@/components/ui/switch"; import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip"; import { getConnectorIcon } from "@/contracts/enums/connectorIcons"; @@ -804,7 +805,7 @@ const ComposerAction: FC = ({ isBlockedByOtherUser = false const isDesktop = useMediaQuery("(min-width: 640px)"); const { openDialog: openUploadDialog } = useDocumentUploadDialog(); const [toolsScrollPos, setToolsScrollPos] = useState<"top" | "middle" | "bottom">("top"); - const toolsRafRef = useRef(); + const toolsRafRef = useRef(undefined); const handleToolsScroll = useCallback((e: React.UIEvent) => { const el = e.currentTarget; if (toolsRafRef.current) return; @@ -1020,14 +1021,29 @@ const ComposerAction: FC = ({ isBlockedByOtherUser = false })} )} - {!filteredTools?.length && ( -
- Loading tools... -
- )} - - - + {!filteredTools?.length && ( +
+ + {["t1", "t2", "t3", "t4"].map((k) => ( +
+ + + +
+ ))} + + {["c1", "c2", "c3"].map((k) => ( +
+ + + +
+ ))} +
+ )} + + +