An AI-powered search engine with a generative UI
TypeScript generative-aigenerative-uinextjsollamareactsearxngshadcn-uitailwindcsstavilytypescriptupstashvercel-ai-sdk
fix: Correct desktop offset calculation for chat messages
Yoshiki Miura24f3bacf827c
diff --git a/components/chat-messages.tsx b/components/chat-messages.tsxindex 3440c479..2516f4c5 100644--- a/components/chat-messages.tsx+++ b/components/chat-messages.tsx@@ -70,9 +70,10 @@ export function ChatMessages({}, [isLoading])// Calculate the offset height based on device type+ // Note: pt-14 (56px) on scroll-container must be included in desktop offsetconst offsetHeight = isMobile? 208 // Mobile: larger offset for mobile header/input- : 140 // Desktop: smaller offset+ : 196 // Desktop: smaller offset (140px) + pt-14 (56px)// Extract citation maps from all messages in all sectionsconst allCitationMaps = useMemo(() => {