From c5d9b1131ec932e53cd0394c283e24549f6426cb Mon Sep 17 00:00:00 2001 From: DDMeaqua Date: Tue, 31 Dec 2024 14:38:58 +0800 Subject: [PATCH] fix: merge bug --- 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 25f692f2ad7..0d6051a31a3 100644 --- a/app/components/chat.tsx +++ b/app/components/chat.tsx @@ -1614,7 +1614,7 @@ function _Chat() { event.key.toLowerCase() === "k" ) { event.preventDefault(); - chatStore.updateCurrentSession((session) => { + chatStore.updateTargetSession(session, (session) => { if (session.clearContextIndex === session.messages.length) { session.clearContextIndex = undefined; } else { @@ -1630,7 +1630,7 @@ function _Chat() { return () => { document.removeEventListener("keydown", handleKeyDown); }; - }, [messages, chatStore, navigate]); + }, [messages, chatStore, navigate, session]); const [showChatSidePanel, setShowChatSidePanel] = useState(false);