From 058501709e6127fce535f45e4c7213f2a8a3292c Mon Sep 17 00:00:00 2001 From: Nicolas Varrot Date: Sat, 14 Feb 2026 03:54:30 +0000 Subject: [PATCH] =?UTF-8?q?chore:=20fix=20lint=20warnings=20=E2=80=94=20su?= =?UTF-8?q?ppress=20eslint-disable=20on=20setState=20in=20effects?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Chat.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Chat.tsx b/src/components/Chat.tsx index 583230e..ac86bad 100644 --- a/src/components/Chat.tsx +++ b/src/components/Chat.tsx @@ -108,7 +108,7 @@ export function Chat({ messages, isGenerating, isLoadingHistory, status, session if (sessionKey !== prevSessionKeyRef.current) { prevSessionKeyRef.current = sessionKey; prevMessageCountRef.current = messages.length; - setNewMessageCount(0); + setNewMessageCount(0); // eslint-disable-line react-hooks/set-state-in-effect -- intentional: reset on session switch isNearBottomRef.current = true; // Scroll to bottom on session switch requestAnimationFrame(() => scrollToBottom('instant')); @@ -130,7 +130,7 @@ export function Chat({ messages, isGenerating, isLoadingHistory, status, session // History just loaded — scroll to bottom, don't show indicator scrollToBottom('instant'); isNearBottomRef.current = true; - setNewMessageCount(0); + setNewMessageCount(0); // eslint-disable-line react-hooks/set-state-in-effect -- intentional: reset after history load return; }