Procházet zdrojové kódy

fix: use current session id to trigger rerender

Dogtiti před 1 rokem
rodič
revize
1d14a991ee
1 změnil soubory, kde provedl 2 přidání a 2 odebrání
  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>;
 }