From 47f490a03474b76544e65327876403ba247596cd Mon Sep 17 00:00:00 2001 From: josc146 Date: Sun, 2 Apr 2023 22:23:55 +0800 Subject: [PATCH] fix: bad sessionId when clearing current conversation at Independent Panel --- src/components/ConversationCard/index.jsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/ConversationCard/index.jsx b/src/components/ConversationCard/index.jsx index 7735e06..562c0cf 100644 --- a/src/components/ConversationCard/index.jsx +++ b/src/components/ConversationCard/index.jsx @@ -286,7 +286,13 @@ function ConversationCard(props) { }, }) setConversationItemData([]) - setSession(initSession({ modelName: session.modelName })) + const newSession = initSession({ + ...session, + question: null, + conversationRecords: [], + }) + newSession.sessionId = session.sessionId + setSession(newSession) }} />