From 09bd8d0b989896dab83b595e85aa10a94ae21133 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C2=A8NW=C2=A8?= <¨neroworld@mail.ru¨> Date: Sat, 11 Apr 2026 00:50:10 +0100 Subject: [PATCH] fix: move isCurrentConvThinking declaration before useEffect to fix ReferenceError --- client/src/pages/Chat.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client/src/pages/Chat.tsx b/client/src/pages/Chat.tsx index 46dba74..336c0e7 100644 --- a/client/src/pages/Chat.tsx +++ b/client/src/pages/Chat.tsx @@ -648,6 +648,10 @@ export default function Chat() { const messages = active?.messages ?? []; const convId = activeId; + const isCurrentConvThinking = activeId + ? isConversationThinking(activeId) + : false; + // ─── Track agent activities from orchestrator tool calls ─────────────────────── // Scans messages for delegate_to_agent calls and creates/removes agent activities @@ -747,10 +751,6 @@ export default function Chat() { activeId, ]); - const isCurrentConvThinking = activeId - ? isConversationThinking(activeId) - : false; - const sendMessage = async () => { if (!input.trim() || isCurrentConvThinking) return;