From 64559de661f197031be2e70986a94b2652c30e7e Mon Sep 17 00:00:00 2001 From: Levi Neely Date: Tue, 6 Oct 2026 15:10:12 +0200 Subject: [PATCH] gui: add agent state indicator dot to session tree Small colored dot to the right of agent name shows execution state: - Green: idle - Blue: thinking - Orange: calling tool - Gray: paused Updates reactively via agentStateChanged event signal. --- kde/gui/SessionTree.qml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/kde/gui/SessionTree.qml b/kde/gui/SessionTree.qml index b41536f..5af9717 100644 --- a/kde/gui/SessionTree.qml +++ b/kde/gui/SessionTree.qml @@ -291,6 +291,36 @@ Item { visible: modelIndex !== renamingIndex } } + + // Agent state indicator (agent rows only) + Rectangle { + id: stateIndicator + Layout.preferredWidth: 8 + Layout.preferredHeight: 8 + Layout.alignment: Qt.AlignVCenter + Layout.leftMargin: 4 + radius: 4 + visible: type === "agent" + color: { + var state = ollie.agentState(parentId || "", agentId || "") + if (state.startsWith("calling")) return "#f0a030" // orange - calling tool + if (state === "thinking") return "#3080f0" // blue - thinking + if (state === "paused") return "#808080" // gray - paused + return "#40c040" // green - idle + } + + Connections { + target: ollie + function onAgentStateChanged(sid, aid, state) { + if (type === "agent" && sid === parentId && aid === agentId) { + if (state.startsWith("calling")) stateIndicator.color = "#f0a030" + else if (state === "thinking") stateIndicator.color = "#3080f0" + else if (state === "paused") stateIndicator.color = "#808080" + else stateIndicator.color = "#40c040" + } + } + } + } } highlighted: (type === "agent" && agentId === ollie.activeAgentId && parentId === ollie.activeSessionId)