Skip to content

Commit

Permalink
Merge pull request ChatGPTNextWeb#5812 from ConnectAI-E/fix/rerender-…
Browse files Browse the repository at this point in the history
…chat

fix: use current session id to trigger rerender
  • Loading branch information
lloydzhou authored Nov 12, 2024
2 parents 459c373 + 1d14a99 commit 7cf89b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/components/chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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>;
}

0 comments on commit 7cf89b5

Please sign in to comment.