-
{label}
+
+
+ {label}
+
+
+ {threads.map((thread) => (
+ onSelect(thread.id)}
+ onDelete={() => onDelete(thread.id)}
+ onTogglePin={() => onTogglePin(thread.id)}
+ onRename={(title) => onRename(thread.id, title)}
+ />
+ ))}
- {threads.map((thread) => (
-
onSelect(thread.id)}
- onDelete={() => onDelete(thread.id)}
- onTogglePin={() => onTogglePin(thread.id)}
- onRename={(title) => onRename(thread.id, title)}
- />
- ))}
);
}
@@ -220,12 +198,8 @@ export function ChatSidebar({
}: ChatSidebarProps) {
const { isSignedIn } = useAuth();
const [searchQuery, setSearchQuery] = useState("");
- const {
- groupedThreads,
- deleteThread,
- togglePin,
- renameThread,
- } = useChatThreads();
+ const { groupedThreads, deleteThread, togglePin, renameThread } =
+ useChatThreads();
const groups = groupedThreads();
@@ -242,19 +216,14 @@ export function ChatSidebar({
: groups;
return (
-
+
{/* Header */}
-
+
{/* Logo and close button */}
-
+
{/* New Chat button */}
-
-
-
+
{/* Search */}
-
{/* Thread list */}
-
+
{filteredGroups.length > 0 ? (
filteredGroups.map((group) => (
-
+
{searchQuery ? "No matching threads" : "No chat history yet"}
@@ -346,18 +292,13 @@ export function ChatSidebar({
{/* Footer - Login prompt for unauthenticated users */}
{!isSignedIn && (
-
+