Yidadaa 2 سال پیش
والد
کامیت
c77f946be1
1فایلهای تغییر یافته به همراه3 افزوده شده و 1 حذف شده
  1. 3 1
      app/components/chat.tsx

+ 3 - 1
app/components/chat.tsx

@@ -445,8 +445,10 @@ export function Chat(props: {
         chatStore
           .onUserInput(messages[i].content)
           .then(() => setIsLoading(false));
+        chatStore.updateCurrentSession((session) =>
+          session.messages.splice(i, 2),
+        );
         inputRef.current?.focus();
-        messages.splice(i, 2);
         return;
       }
     }