From bb8404548128dddb234d0cba48891546b6db3283 Mon Sep 17 00:00:00 2001 From: heimoshuiyu Date: Sat, 25 Mar 2023 01:02:38 +0800 Subject: [PATCH] scroll to bottom of messages generating messages --- src/chatbox.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/chatbox.tsx b/src/chatbox.tsx index 168cc1a..dd70603 100644 --- a/src/chatbox.tsx +++ b/src/chatbox.tsx @@ -21,7 +21,7 @@ export default function ChatBOX(props: { useEffect(() => { console.log("ref", messagesEndRef); messagesEndRef.current.scrollIntoView({ behavior: "smooth" }); - }, [showRetry, showGenerating]); + }, [showRetry, showGenerating, generatingMessage]); const client = new ChatGPT(chatStore.apiKey);