瀏覽代碼

fix: use current session id to trigger rerender

Dogtiti 1 年之前
父節點
當前提交
1d14a991ee
共有 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>;
 }