@yemi33/minions 0.1.866 → 0.1.867
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/CHANGELOG.md +2 -1
- package/dashboard/js/detail-panel.js +2 -0
- package/dashboard/js/live-stream.js +19 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -65,11 +65,13 @@ function renderDetailContent(detail, tab) {
|
|
|
65
65
|
|
|
66
66
|
el.innerHTML = html;
|
|
67
67
|
} else if (tab === 'live') {
|
|
68
|
+
var startedAt = detail.statusData?.started_at;
|
|
68
69
|
el.innerHTML =
|
|
69
70
|
'<div id="live-chat" style="display:flex;flex-direction:column;height:60vh">' +
|
|
70
71
|
'<div id="live-messages" style="flex:1;overflow-y:auto;padding:8px;font-size:11px;line-height:1.6;display:flex;flex-direction:column"></div>' +
|
|
71
72
|
'<div id="live-status-bar" style="padding:4px 8px;display:flex;align-items:center;gap:8px;border-top:1px solid var(--border)">' +
|
|
72
73
|
'<span class="pulse"></span><span id="live-status-label" style="font-size:11px;color:var(--green)">Streaming live</span>' +
|
|
74
|
+
'<span id="live-runtime" style="font-size:10px;color:var(--muted)" data-started="' + (startedAt || '') + '"></span>' +
|
|
73
75
|
'<button class="pr-pager-btn" onclick="refreshLiveOutput()" style="font-size:10px">Refresh</button>' +
|
|
74
76
|
'</div>' +
|
|
75
77
|
'<div id="live-steer-bar" style="display:flex;gap:8px;padding:8px;border-top:1px solid var(--border)">' +
|
|
@@ -4,6 +4,20 @@ let livePollingInterval = null;
|
|
|
4
4
|
let liveEventSource = null;
|
|
5
5
|
let _steerInFlight = false;
|
|
6
6
|
let _lastRenderedText = '';
|
|
7
|
+
let _runtimeTimer = null;
|
|
8
|
+
|
|
9
|
+
function _updateRuntimeCounter() {
|
|
10
|
+
var el = document.getElementById('live-runtime');
|
|
11
|
+
if (!el) return;
|
|
12
|
+
var started = el.dataset.started;
|
|
13
|
+
if (!started) return;
|
|
14
|
+
var ms = Date.now() - new Date(started).getTime();
|
|
15
|
+
if (ms < 0) ms = 0;
|
|
16
|
+
var sec = Math.floor(ms / 1000) % 60;
|
|
17
|
+
var min = Math.floor(ms / 60000) % 60;
|
|
18
|
+
var hr = Math.floor(ms / 3600000);
|
|
19
|
+
el.textContent = (hr > 0 ? hr + 'h ' : '') + min + 'm ' + sec + 's';
|
|
20
|
+
}
|
|
7
21
|
|
|
8
22
|
function renderLiveChatMessage(raw) {
|
|
9
23
|
const el = document.getElementById('live-messages');
|
|
@@ -87,6 +101,10 @@ function startLiveStream(agentId) {
|
|
|
87
101
|
if (msgEl) msgEl.innerHTML = '';
|
|
88
102
|
_lastRenderedText = '';
|
|
89
103
|
|
|
104
|
+
// Start runtime counter
|
|
105
|
+
_updateRuntimeCounter();
|
|
106
|
+
_runtimeTimer = setInterval(_updateRuntimeCounter, 1000);
|
|
107
|
+
|
|
90
108
|
// Use polling instead of SSE to avoid HTTP/1.1 connection exhaustion
|
|
91
109
|
// (SSE holds a persistent connection, blocking CC and other API calls)
|
|
92
110
|
startLivePolling();
|
|
@@ -97,6 +115,7 @@ function stopLiveStream() {
|
|
|
97
115
|
liveEventSource.close();
|
|
98
116
|
liveEventSource = null;
|
|
99
117
|
}
|
|
118
|
+
if (_runtimeTimer) { clearInterval(_runtimeTimer); _runtimeTimer = null; }
|
|
100
119
|
stopLivePolling();
|
|
101
120
|
}
|
|
102
121
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yemi33/minions",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.867",
|
|
4
4
|
"description": "Multi-agent AI dev team that runs from ~/.minions/ — five autonomous agents share a single engine, dashboard, and knowledge base",
|
|
5
5
|
"bin": {
|
|
6
6
|
"minions": "bin/minions.js"
|