소스 검색

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

fix: use current session id to trigger rerender
Lloyd Zhou 1 년 전
부모
커밋
7cf89b53ce
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      app/components/chat.tsx

+ 2 - 2
app/components/chat.tsx

@@ -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>;
 }