Forráskód Böngészése

fix: #866 remove unused retry messages

Yidadaa 1 éve
szülő
commit
525a2ff9a7
1 módosított fájl, 2 hozzáadás és 3 törlés
  1. 2 3
      app/components/chat.tsx

+ 2 - 3
app/components/chat.tsx

@@ -570,10 +570,9 @@ export function Chat(props: {
     if (userIndex === null) return;
 
     setIsLoading(true);
-    chatStore
-      .onUserInput(session.messages[userIndex].content)
-      .then(() => setIsLoading(false));
+    const content = session.messages[userIndex].content;
     deleteMessage(userIndex);
+    chatStore.onUserInput(content).then(() => setIsLoading(false));
     inputRef.current?.focus();
   };