Explorar el Código

Update chat.ts

Jiacheng Dong hace 1 año
padre
commit
4dd5bf71ea
Se han modificado 1 ficheros con 0 adiciones y 5 borrados
  1. 0 5
      app/store/chat.ts

+ 0 - 5
app/store/chat.ts

@@ -274,8 +274,6 @@ export const useChatStore = create<ChatStore>()(
 
         // 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<ChatStore>()(
             if (message) {
               botMessage.content = message;
             }
-            // set(() => ({}));
             get().updateCurrentSession((session) => {
               session.messages = session.messages.concat();
             });
@@ -304,7 +301,6 @@ export const useChatStore = create<ChatStore>()(
               sessionIndex,
               botMessage.id ?? messageIndex,
             );
-            // set(() => ({}));
           },
           onError(error) {
             const isAborted = error.message.includes("aborted");
@@ -320,7 +316,6 @@ export const useChatStore = create<ChatStore>()(
             get().updateCurrentSession((session) => {
               session.messages = session.messages.concat();
             });
-            // set(() => ({}));
             ChatControllerPool.remove(
               sessionIndex,
               botMessage.id ?? messageIndex,