gui: agent tree dot uses ollie.activeState directly for active agent

This commit is contained in:
Levi Neely 2026-08-04 16:19:33 +02:00
parent dbd2606ed2
commit 1d79d0ee89
1 changed files with 9 additions and 5 deletions

View File

@ -1133,12 +1133,16 @@ ApplicationWindow {
if (cc === "red") return "#f44336"
return "#9e9e9e"
}
// Agent: use same logic as top indicator
// Agent: match top indicator exactly when this is the active agent
if (agentId === ollie.activeAgentId && parentId === ollie.activeSessionId) {
if (ollie.isSessionPaused(ollie.activeSessionId)) return "#9e9e9e"
if (ollie.activeState === "idle") return "#4caf50"
if (ollie.activeState.startsWith("calling")) return "#ff9800"
return "#2196f3"
}
// Non-active agent: gray if paused, green otherwise
if (ollie.isSessionPaused(parentId)) return "#9e9e9e"
var s = ollie.agentState(parentId, agentId)
if (s === "idle") return "#4caf50"
if (s.startsWith("calling")) return "#ff9800"
return "#2196f3"
return "#4caf50"
}
}
}