From 525a2ff9a7e9b1be79a15972f138d092b71bf4de Mon Sep 17 00:00:00 2001 From: Yidadaa Date: Mon, 17 Apr 2023 22:51:14 +0800 Subject: [PATCH] fix: #866 remove unused retry messages --- app/components/chat.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/components/chat.tsx b/app/components/chat.tsx index 991ef312..3c66627f 100644 --- a/app/components/chat.tsx +++ b/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(); };