orquesta-agent 0.2.66 → 0.2.67
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ui/public/app.js +15 -2
- package/package.json +1 -1
package/dist/ui/public/app.js
CHANGED
|
@@ -108,8 +108,21 @@ function setBar(id, pct) {
|
|
|
108
108
|
async function loadAgents() {
|
|
109
109
|
try {
|
|
110
110
|
const res = await fetch(`${API}/agents`)
|
|
111
|
-
|
|
112
|
-
|
|
111
|
+
const newAgents = await res.json()
|
|
112
|
+
|
|
113
|
+
// Only re-render if agents changed (avoid killing open panels/SSE)
|
|
114
|
+
const changed = JSON.stringify(newAgents.map(a => `${a.id}:${a.status}:${a.pid}`)) !==
|
|
115
|
+
JSON.stringify(agents.map(a => `${a.id}:${a.status}:${a.pid}`))
|
|
116
|
+
agents = newAgents
|
|
117
|
+
|
|
118
|
+
if (changed) {
|
|
119
|
+
renderAgents()
|
|
120
|
+
} else {
|
|
121
|
+
// Just update counts
|
|
122
|
+
const running = agents.filter(a => a.status === 'running').length
|
|
123
|
+
const countEl = document.getElementById('agent-count')
|
|
124
|
+
if (countEl) countEl.textContent = `${running} of ${agents.length} online`
|
|
125
|
+
}
|
|
113
126
|
} catch {}
|
|
114
127
|
}
|
|
115
128
|
|