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)