diff --git a/surfsense_web/components/layout/ui/sidebar/AllChatsSidebar.tsx b/surfsense_web/components/layout/ui/sidebar/AllChatsSidebar.tsx index 0a15ecde5..8e065f5a5 100644 --- a/surfsense_web/components/layout/ui/sidebar/AllChatsSidebar.tsx +++ b/surfsense_web/components/layout/ui/sidebar/AllChatsSidebar.tsx @@ -4,7 +4,8 @@ import { useQuery, useQueryClient } from "@tanstack/react-query"; import { useSetAtom } from "jotai"; import { ArchiveIcon, - MessageCircleMore, + Check, + ChevronDown, MoreHorizontal, Pencil, RotateCcwIcon, @@ -19,7 +20,6 @@ import { useTranslations } from "next-intl"; import { useCallback, useMemo, useRef, useState } from "react"; import { toast } from "sonner"; import { removeChatTabAtom } from "@/atoms/tabs/tabs.atom"; -import { Tabs, TabsList, TabsTrigger } from "@/components/ui/animated-tabs"; import { Button } from "@/components/ui/button"; import { Dialog, @@ -239,14 +239,48 @@ function AllChatsContent({ searchSpaceId, className }: AllChatsContentProps) { const isLoading = isSearchMode ? isLoadingSearch : isLoadingThreads; const error = isSearchMode ? searchError : threadsError; - const activeCount = activeChats.length; - const archivedCount = archivedChats.length; + const selectedFilterLabel = showArchived ? "Archived" : "Active"; return ( -
-
-
+
+
+

{t("chats") || "Chats"}

+ {!isSearchMode && ( + + + + + + setShowArchived(false)}> + Active + + + setShowArchived(true)}> + Archived + + + + + )}
@@ -272,35 +306,6 @@ function AllChatsContent({ searchSpaceId, className }: AllChatsContentProps) {
- {!isSearchMode && ( - setShowArchived(value === "archived")} - className="shrink-0 mx-3 mt-1.5" - > - - - - - Active - - {activeCount} - - - - - - - Archived - - {archivedCount} - - - - - - )} -
{isLoading ? (
@@ -556,7 +561,7 @@ function AllChatsContent({ searchSpaceId, className }: AllChatsContentProps) { export function AllChatsWorkspaceContent({ searchSpaceId }: { searchSpaceId: string }) { return ( -
+
);