fix: use state role directly for binding updates

model.state doesn't trigger binding re-evaluation in Qt5 delegates.
Using the implicit role 'state' directly does.
This commit is contained in:
Levi Neely 2026-08-03 20:31:17 +02:00
parent 1d0fb99501
commit 3fd13c6d38
1 changed files with 2 additions and 2 deletions

View File

@ -991,8 +991,8 @@ ApplicationWindow {
if (cc === "red") return "#f44336"
return "#9e9e9e"
}
// Agent: use state from model (already updated via onAgentStateChanged)
var s = model.state || "idle"
// Agent: use state role from model
var s = state || "idle"
if (s === "idle") return "#4caf50"
if (s.startsWith("calling")) return "#ff9800"
return "#2196f3"