From c77f946be1aeeab55700e8ed54fabb3c92cc2ebe Mon Sep 17 00:00:00 2001 From: Yidadaa Date: Thu, 6 Apr 2023 04:01:53 +0800 Subject: [PATCH] fixup --- app/components/chat.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/components/chat.tsx b/app/components/chat.tsx index ea1eb7e2..90c88d97 100644 --- a/app/components/chat.tsx +++ b/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; } }