An AI-powered search engine with a generative UI
TypeScript generative-aigenerative-uinextjsollamareactsearxngshadcn-uitailwindcsstavilytypescriptupstashvercel-ai-sdk
Fix Formatting
Dhaval8d1573831c46
diff --git a/components/chat.tsx b/components/chat.tsxindex 08f90460..93d5dc62 100644--- a/components/chat.tsx+++ b/components/chat.tsx@@ -125,9 +125,10 @@ export function Chat({// Scroll to the section when a new user message is sentuseEffect(() => {// Only scroll if this chat is currently visible in the URL- const isCurrentChat = window.location.pathname === `/search/${id}` ||- (window.location.pathname === '/' && sections.length > 0)-+ const isCurrentChat =+ window.location.pathname === `/search/${id}` ||+ (window.location.pathname === '/' && sections.length > 0)+if (isCurrentChat && sections.length > 0) {const lastMessage = messages[messages.length - 1]if (lastMessage && lastMessage.role === 'user') {