Merge pull request #5812 from ConnectAI-E/fix/rerender-chat

fix: use current session id to trigger rerender
This commit is contained in:
Lloyd Zhou 2024-11-12 13:49:51 +08:00 committed by GitHub
commit 7cf89b53ce
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2071,6 +2071,6 @@ function _Chat() {
export function Chat() {
const chatStore = useChatStore();
const sessionIndex = chatStore.currentSessionIndex;
return <_Chat key={sessionIndex}></_Chat>;
const session = chatStore.currentSession();
return <_Chat key={session.id}></_Chat>;
}