From 1d14a991eedb17a492d6e840de71567c8a6884a7 Mon Sep 17 00:00:00 2001 From: Dogtiti <499960698@qq.com> Date: Mon, 11 Nov 2024 20:30:59 +0800 Subject: [PATCH] fix: use current session id to trigger rerender --- app/components/chat.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/components/chat.tsx b/app/components/chat.tsx index ed51d926f4e..5669cc9a314 100644 --- a/app/components/chat.tsx +++ b/app/components/chat.tsx @@ -2071,6 +2071,6 @@ function _Chat() { export function Chat() { const chatStore = useChatStore(); - const sessionIndex = chatStore.currentSessionIndex; - return <_Chat key={sessionIndex}>; + const session = chatStore.currentSession(); + return <_Chat key={session.id}>; }