From 7cbaaed014a2b1daa02a8b0eaab1e2b6c3068d32 Mon Sep 17 00:00:00 2001 From: Levi Neely Date: Tue, 6 Oct 2026 15:16:57 +0200 Subject: [PATCH] gui: gray state indicator when session is paused Session paused state overrides agent state for the indicator. Reacts to sessionsChanged signal for pause/resume updates. --- kde/gui/SessionTree.qml | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/kde/gui/SessionTree.qml b/kde/gui/SessionTree.qml index 6244574..bac1ce2 100644 --- a/kde/gui/SessionTree.qml +++ b/kde/gui/SessionTree.qml @@ -303,6 +303,8 @@ Item { radius: height / 2 visible: type === "agent" color: { + // Session paused overrides agent state + if (ollie.isSessionPaused(parentId || "")) return "#808080" // gray - session paused var state = ollie.agentState(parentId || "", agentId || "") if (state.startsWith("calling")) return "#f0a030" // orange - calling tool if (state === "thinking") return "#3080f0" // blue - thinking @@ -314,12 +316,23 @@ Item { 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" + stateIndicator.color = stateIndicator.computeColor() } } + function onSessionsChanged() { + if (type === "agent") { + stateIndicator.color = stateIndicator.computeColor() + } + } + } + + function computeColor() { + if (ollie.isSessionPaused(parentId || "")) return "#808080" + var state = ollie.agentState(parentId || "", agentId || "") + if (state.startsWith("calling")) return "#f0a030" + else if (state === "thinking") return "#3080f0" + else if (state === "paused") return "#808080" + else return "#40c040" } } }