fix: move isCurrentConvThinking before useEffect that references it in dependency array

This commit is contained in:
¨NW¨
2026-04-11 01:21:35 +01:00
parent 09bd8d0b98
commit bf66df31da

View File

@@ -617,6 +617,13 @@ export default function Chat() {
}
}, [orchestratorConfigQuery.data, conversations.length]);
const messages = active?.messages ?? [];
const convId = activeId;
const isCurrentConvThinking = activeId
? isConversationThinking(activeId)
: false;
// Auto-scroll to bottom when messages change
useEffect(() => {
const el = scrollRef.current;
@@ -645,13 +652,6 @@ export default function Chat() {
adjustTextareaHeight();
}, [input, adjustTextareaHeight]);
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