From 022ac213695d7fb7c855e4726d0ce44882a1735f Mon Sep 17 00:00:00 2001 From: Haileyesus Date: Thu, 12 Feb 2026 20:45:45 +0300 Subject: [PATCH] refactor(chat): exclude currentSessionId from dependency array to prevent unnecessary reloading of messages --- src/components/chat/hooks/useChatSessionState.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/chat/hooks/useChatSessionState.ts b/src/components/chat/hooks/useChatSessionState.ts index 6776a0f..c792b94 100644 --- a/src/components/chat/hooks/useChatSessionState.ts +++ b/src/components/chat/hooks/useChatSessionState.ts @@ -399,7 +399,7 @@ export function useChatSessionState({ loadMessages(); }, [ - currentSessionId, + // Intentionally exclude currentSessionId: this effect sets it and should not retrigger another full load. isSystemSessionChange, loadCursorSessionMessages, loadSessionMessages,