fix: CPU hogging GUI (#2877)

This commit is contained in:
Michael Neale
2025-06-12 19:21:59 +10:00
committed by GitHub
parent 030e8a82b5
commit 265ee02265
2 changed files with 22 additions and 8 deletions
+3 -2
View File
@@ -280,8 +280,9 @@ function ChatContent({
// Update chat messages when they change and save to sessionStorage
useEffect(() => {
setChat({ ...chat, messages });
}, [messages, setChat, chat]);
// @ts-expect-error - TypeScript being overly strict about the return type
setChat((prevChat: ChatType) => ({ ...prevChat, messages }));
}, [messages, setChat]);
useEffect(() => {
if (messages.length > 0) {