@yemi33/minions 0.1.627 → 0.1.629
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 +6 -0
- package/dashboard/js/command-center.js +12 -7
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -31,9 +31,6 @@ function ccAbort() {
|
|
|
31
31
|
_ccAbortController.abort();
|
|
32
32
|
_ccAbortController = null;
|
|
33
33
|
}
|
|
34
|
-
// Clear queue so aborted send doesn't drain queued messages
|
|
35
|
-
_ccQueue = [];
|
|
36
|
-
_renderQueueIndicator();
|
|
37
34
|
}
|
|
38
35
|
|
|
39
36
|
function toggleCommandCenter() {
|
|
@@ -158,14 +155,19 @@ async function ccSend() {
|
|
|
158
155
|
_renderQueueIndicator();
|
|
159
156
|
return;
|
|
160
157
|
}
|
|
161
|
-
await _ccDoSend(message);
|
|
158
|
+
let wasAborted = await _ccDoSend(message);
|
|
162
159
|
|
|
163
|
-
// Drain queue —
|
|
164
|
-
// Queue is cleared by ccAbort() if user stops mid-stream
|
|
160
|
+
// Drain queue — send each queued message in order
|
|
165
161
|
while (_ccQueue.length > 0) {
|
|
162
|
+
// After abort, pause to let server release ccInFlight guard before next send
|
|
163
|
+
if (wasAborted) {
|
|
164
|
+
_ccSending = true; // keep sending flag true so new messages queue instead of bypassing
|
|
165
|
+
await new Promise(r => setTimeout(r, 500));
|
|
166
|
+
_ccSending = false;
|
|
167
|
+
}
|
|
166
168
|
const next = _ccQueue.shift();
|
|
167
169
|
_renderQueueIndicator();
|
|
168
|
-
await _ccDoSend(next);
|
|
170
|
+
wasAborted = await _ccDoSend(next);
|
|
169
171
|
}
|
|
170
172
|
}
|
|
171
173
|
|
|
@@ -208,6 +210,7 @@ async function _ccDoSend(message, skipUserMsg) {
|
|
|
208
210
|
|
|
209
211
|
_ccSending = true;
|
|
210
212
|
_ccAbortController = new AbortController();
|
|
213
|
+
let _wasAborted = false;
|
|
211
214
|
try { localStorage.setItem('cc-sending', JSON.stringify({ sending: true, startedAt: Date.now() })); } catch {}
|
|
212
215
|
|
|
213
216
|
if (!skipUserMsg) ccAddMessage('user', escHtml(message));
|
|
@@ -359,6 +362,7 @@ async function _ccDoSend(message, skipUserMsg) {
|
|
|
359
362
|
} catch (e) {
|
|
360
363
|
if (streamDiv?.parentNode) { clearInterval(phaseTimer); streamDiv.remove(); }
|
|
361
364
|
if (e.name === 'AbortError') {
|
|
365
|
+
_wasAborted = true;
|
|
362
366
|
if (streamedText) {
|
|
363
367
|
const ccElapsed = Math.round((Date.now() - ccStartTime) / 1000);
|
|
364
368
|
ccAddMessage('assistant', renderMd(streamedText) + '<div style="font-size:9px;color:var(--muted);margin-top:6px;display:flex;justify-content:flex-end;padding-right:30px">Stopped after ' + ccElapsed + 's</div>');
|
|
@@ -382,6 +386,7 @@ async function _ccDoSend(message, skipUserMsg) {
|
|
|
382
386
|
// Show notification badge on CC button if drawer is closed
|
|
383
387
|
if (!_ccOpen) showNotifBadge(document.getElementById('cc-toggle-btn'));
|
|
384
388
|
}
|
|
389
|
+
return _wasAborted;
|
|
385
390
|
}
|
|
386
391
|
|
|
387
392
|
function ccRetryLast() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yemi33/minions",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.629",
|
|
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"
|