An AI-powered search engine with a generative UI
TypeScript generative-aigenerative-uinextjsollamareactsearxngshadcn-uitailwindcsstavilytypescriptupstashvercel-ai-sdk
fix: adjust mobile spacing for chat messages header overlap and logo padding
Yoshiki Miura8ff31eb121db
diff --git a/components/chat-messages.tsx b/components/chat-messages.tsxindex d6cdf9cc..6f7b3410 100644--- a/components/chat-messages.tsx+++ b/components/chat-messages.tsx@@ -67,7 +67,7 @@ export function ChatMessages({// Calculate the offset height based on device type// Note: pt-14 (56px) on scroll-container must be included in desktop offsetconst offsetHeight = isMobile- ? 192 // Mobile: larger offset for mobile header/input (pt-10 = 40px)+ ? 200 // Mobile: larger offset for mobile header/input (pt-12 = 48px): 196 // Desktop: smaller offset (140px) + pt-14 (56px)// Extract citation maps from all messages in all sections@@ -162,7 +162,7 @@ export function ChatMessages({role="list"aria-roledescription="chat messages"className={cn(- 'relative size-full pt-10 md:pt-14',+ 'relative size-full pt-12 md:pt-14',sections.length > 0 ? 'flex-1 overflow-y-auto' : '')}>@@ -171,7 +171,7 @@ export function ChatMessages({<divkey={section.id}id={`section-${section.id}`}- className="chat-section pb-8 md:pb-14"+ className="chat-section pb-4 md:pb-14"style={sectionIndex === sections.length - 1? { minHeight: `calc(100dvh - ${offsetHeight}px)` }@@ -230,7 +230,7 @@ export function ChatMessages({})}{/* Show assistant logo after assistant messages */}{showAssistantLogo && sectionIndex === sections.length - 1 && (- <div className="flex justify-start py-4">+ <div className="flex justify-start py-1 md:py-4"><AnimatedLogo className="size-10" animate={isLoading} /></div>)}