diff options
| author | MaheshtheDev <[email protected]> | 2026-01-23 22:20:32 +0000 |
|---|---|---|
| committer | MaheshtheDev <[email protected]> | 2026-01-23 22:20:32 +0000 |
| commit | ebd083a65ba33e3c9b103f787decc2faa5334f60 (patch) | |
| tree | 85ea306015e576d8d4394d2ec80f37fd02362ecb /apps/web/components/header.tsx | |
| parent | feat: full screen note, space highlights, suggestions (#696) (diff) | |
| download | supermemory-ebd083a65ba33e3c9b103f787decc2faa5334f60.tar.xz supermemory-ebd083a65ba33e3c9b103f787decc2faa5334f60.zip | |
feat: chat history and fetching previous chats to chat pane (#698)01-22-feat_chat_history_and_fetching_previous_chats_to_chat_pane
Diffstat (limited to 'apps/web/components/header.tsx')
| -rw-r--r-- | apps/web/components/header.tsx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/web/components/header.tsx b/apps/web/components/header.tsx index 161b4edd..e2115aa8 100644 --- a/apps/web/components/header.tsx +++ b/apps/web/components/header.tsx @@ -47,6 +47,7 @@ import { ScrollArea } from "@ui/components/scroll-area" import { formatDistanceToNow } from "date-fns" import { cn } from "@lib/utils" import { useEffect, useMemo, useState } from "react" +import { generateId } from "@lib/generate-id" export function Header({ onAddMemory }: { onAddMemory?: () => void }) { const { user } = useAuth() @@ -98,7 +99,7 @@ export function Header({ onAddMemory }: { onAddMemory?: () => void }) { function handleNewChat() { analytics.newChatStarted() - const newId = crypto.randomUUID() + const newId = generateId() setCurrentChatId(newId) router.push(`/chat/${newId}`) setIsDialogOpen(false) @@ -129,7 +130,7 @@ export function Header({ onAddMemory }: { onAddMemory?: () => void }) { > {getCurrentChat()?.title && pathname.includes("/chat") ? ( <div className="flex items-center gap-2 md:gap-4 min-w-0 max-w-[200px] md:max-w-md"> - <Logo className="h-6 block text-foreground flex-shrink-0" /> + <Logo className="h-6 block text-foreground shrink-0" /> <span className="truncate text-sm md:text-base"> {getCurrentChat()?.title} </span> |