fix: chat loses conversation context between messages
Some checks failed
Deploy to Production / Build and Deploy (push) Failing after 43s
Some checks failed
Deploy to Production / Build and Deploy (push) Failing after 43s
Remove revalidatePath('/chat') from createConversation — it caused
the server to re-render the /chat page after each new conversation,
which reset the useChat hook state and created a new conversation
for every message instead of continuing the existing one.
Sidebar now refreshes client-side after streaming completes.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -21,7 +21,6 @@ export async function createConversation(title: string, notebookId?: string) {
|
||||
},
|
||||
})
|
||||
|
||||
revalidatePath('/chat')
|
||||
return { id: conversation.id, title: conversation.title }
|
||||
}
|
||||
|
||||
@@ -69,6 +68,5 @@ export async function deleteConversation(id: string) {
|
||||
where: { id, userId: session.user.id }
|
||||
})
|
||||
|
||||
revalidatePath('/chat')
|
||||
return { success: true }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user