gui: agent tree dot uses ollie.agentState() like top indicator

This commit is contained in:
Levi Neely 2026-08-04 16:18:42 +02:00
parent 457a6a55dc
commit dbd2606ed2
1 changed files with 5 additions and 8 deletions

View File

@ -1125,22 +1125,19 @@ ApplicationWindow {
Layout.alignment: Qt.AlignVCenter
radius: 4
visible: type !== "header"
property string agentState: (type === "agent") ? (state || "idle") : ""
property bool isPaused: (type === "agent") ? (parentPaused === true) : false
color: {
if (type === "session") {
// Session: RPC connection health
var cc = connectionColor || "gray"
if (cc === "green") return "#4caf50"
if (cc === "yellow") return "#ffca28"
if (cc === "red") return "#f44336"
return "#9e9e9e"
}
// Agent: gray if parent session is paused
if (isPaused) return "#9e9e9e"
// Agent: use state role from model
if (agentState === "idle") return "#4caf50"
if (agentState.startsWith("calling")) return "#ff9800"
// Agent: use same logic as top indicator
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"
}
}