From 512cf535e030ca60e683a427b4e02863764d4d71 Mon Sep 17 00:00:00 2001 From: sabaimran Date: Fri, 29 Nov 2024 18:10:35 -0800 Subject: [PATCH] Collapse train of thought when completed during live stream --- .../web/app/components/chatHistory/chatHistory.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/interface/web/app/components/chatHistory/chatHistory.tsx b/src/interface/web/app/components/chatHistory/chatHistory.tsx index c5fd8b54..5a750e8b 100644 --- a/src/interface/web/app/components/chatHistory/chatHistory.tsx +++ b/src/interface/web/app/components/chatHistory/chatHistory.tsx @@ -54,11 +54,11 @@ function TrainOfThoughtComponent(props: TrainOfThoughtComponentProps) { const lastIndex = props.trainOfThought.length - 1; const [collapsed, setCollapsed] = useState(props.completed); - // useEffect(() => { - // if (props.completed) { - // setCollapsed(true); - // } - // }), [props.completed]; + useEffect(() => { + if (props.completed) { + setCollapsed(true); + } + }, [props.completed]); return (