An AI-powered search engine with a generative UI
TypeScript generative-aigenerative-uinextjsollamareactsearxngshadcn-uitailwindcsstavilytypescriptupstashvercel-ai-sdk
Add delay before refreshing chat history
Yoshiki Miura6364bfce536c
diff --git a/components/chat.tsx b/components/chat.tsxindex 7fd51524..84201f64 100644--- a/components/chat.tsx+++ b/components/chat.tsx@@ -26,7 +26,9 @@ export function Chat({ id }: ChatProps) {console.log('aiState', aiState.messages[aiState.messages.length - 1]?.type)if (aiState.messages[aiState.messages.length - 1]?.type === 'followup') {// Refresh the page to chat history updates- router.refresh()+ setTimeout(() => {+ router.refresh()+ }, 1000)}}, [aiState, router])