From 4dd5bf71ea89a889ee0fc19fbeefe0c224f0e93a Mon Sep 17 00:00:00 2001 From: Jiacheng Dong <43509711+Jiacheng787@users.noreply.github.com> Date: Thu, 15 Jun 2023 13:59:38 +0800 Subject: [PATCH] Update chat.ts --- app/store/chat.ts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/app/store/chat.ts b/app/store/chat.ts index 335e4be7..e1bd2eb4 100644 --- a/app/store/chat.ts +++ b/app/store/chat.ts @@ -274,8 +274,6 @@ export const useChatStore = create()( // save user's and bot's message get().updateCurrentSession((session) => { - // session.messages.push(userMessage); - // session.messages.push(botMessage); session.messages = session.messages.concat([userMessage, botMessage]); }); @@ -289,7 +287,6 @@ export const useChatStore = create()( if (message) { botMessage.content = message; } - // set(() => ({})); get().updateCurrentSession((session) => { session.messages = session.messages.concat(); }); @@ -304,7 +301,6 @@ export const useChatStore = create()( sessionIndex, botMessage.id ?? messageIndex, ); - // set(() => ({})); }, onError(error) { const isAborted = error.message.includes("aborted"); @@ -320,7 +316,6 @@ export const useChatStore = create()( get().updateCurrentSession((session) => { session.messages = session.messages.concat(); }); - // set(() => ({})); ChatControllerPool.remove( sessionIndex, botMessage.id ?? messageIndex,