From 0747835067a77eeb3b7bf6b1c7e1e898e0e177f3 Mon Sep 17 00:00:00 2001 From: lhwan <1017484907@qq.com> Date: Fri, 30 Aug 2024 15:50:46 +0800 Subject: [PATCH] feat: chat page stroboscopic bugfix --- web/new-components/chat/content/ChatCompletion.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web/new-components/chat/content/ChatCompletion.tsx b/web/new-components/chat/content/ChatCompletion.tsx index f5200fb71..b91d374c5 100644 --- a/web/new-components/chat/content/ChatCompletion.tsx +++ b/web/new-components/chat/content/ChatCompletion.tsx @@ -72,15 +72,15 @@ const ChatCompletion: React.FC = () => { setTimeout(() => { scrollableRef.current?.scrollTo(0, scrollableRef.current?.scrollHeight); }, 50); - }, [history]); + }, [history, history[history.length - 1].context]]); return (
{!!showMessages.length && - showMessages.map(content => { + showMessages.map((content, index) => { return ( { setJsonModalOpen(true);