@yemi33/minions 0.1.271 → 0.1.272
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/command-center.js +15 -7
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,7 @@ let _ccMessages = JSON.parse(localStorage.getItem('cc-messages') || '[]');
|
|
|
5
5
|
let _ccOpen = false;
|
|
6
6
|
let _ccSending = false;
|
|
7
7
|
let _ccQueue = [];
|
|
8
|
+
let _ccAbortController = null;
|
|
8
9
|
// Clear stale sending state on page load — SSE streams don't survive refresh
|
|
9
10
|
try { localStorage.removeItem('cc-sending'); } catch {}
|
|
10
11
|
|
|
@@ -109,13 +110,18 @@ async function ccSend() {
|
|
|
109
110
|
if (!message) return;
|
|
110
111
|
input.value = '';
|
|
111
112
|
|
|
112
|
-
// If already processing,
|
|
113
|
+
// If already processing, abort current and send the new one immediately
|
|
113
114
|
if (_ccSending) {
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
115
|
+
if (_ccAbortController) {
|
|
116
|
+
_ccAbortController.abort();
|
|
117
|
+
_ccAbortController = null;
|
|
118
|
+
}
|
|
119
|
+
_ccSending = false;
|
|
120
|
+
// Mark current streaming message as interrupted
|
|
121
|
+
var lastEl = document.getElementById('cc-messages').lastElementChild;
|
|
122
|
+
if (lastEl && (lastEl.innerHTML.includes('Thinking') || lastEl.innerHTML.includes('\uD83D\uDD27'))) {
|
|
123
|
+
lastEl.innerHTML += '<div style="font-size:9px;color:var(--muted);margin-top:4px;font-style:italic">(interrupted)</div>';
|
|
124
|
+
}
|
|
119
125
|
}
|
|
120
126
|
await _ccDoSend(message);
|
|
121
127
|
|
|
@@ -134,6 +140,7 @@ async function ccSend() {
|
|
|
134
140
|
|
|
135
141
|
async function _ccDoSend(message, skipUserMsg) {
|
|
136
142
|
_ccSending = true;
|
|
143
|
+
_ccAbortController = new AbortController();
|
|
137
144
|
try { localStorage.setItem('cc-sending', JSON.stringify({ sending: true, startedAt: Date.now() })); } catch {}
|
|
138
145
|
|
|
139
146
|
if (!skipUserMsg) ccAddMessage('user', escHtml(message));
|
|
@@ -178,7 +185,7 @@ async function _ccDoSend(message, skipUserMsg) {
|
|
|
178
185
|
const res = await fetch('/api/command-center/stream', {
|
|
179
186
|
method: 'POST', headers: { 'Content-Type': 'application/json' },
|
|
180
187
|
body: JSON.stringify({ message }),
|
|
181
|
-
signal: AbortSignal.timeout(960000)
|
|
188
|
+
signal: _ccAbortController ? _ccAbortController.signal : AbortSignal.timeout(960000)
|
|
182
189
|
});
|
|
183
190
|
|
|
184
191
|
if (!res.ok) {
|
|
@@ -297,6 +304,7 @@ async function _ccDoSend(message, skipUserMsg) {
|
|
|
297
304
|
'<button id="' + retryId + '" onclick="ccRetryLast()" style="margin-top:6px;padding:4px 12px;background:var(--surface2);border:1px solid var(--border);border-radius:4px;color:var(--blue);cursor:pointer;font-size:11px">Retry</button>');
|
|
298
305
|
} finally {
|
|
299
306
|
_ccSending = false;
|
|
307
|
+
_ccAbortController = null;
|
|
300
308
|
try { localStorage.removeItem('cc-sending'); } catch {}
|
|
301
309
|
// Show notification badge on CC button if drawer is closed
|
|
302
310
|
if (!_ccOpen) showNotifBadge(document.getElementById('cc-toggle-btn'));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yemi33/minions",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.272",
|
|
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"
|