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);