@yemi33/minions 0.1.627 → 0.1.628
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 +5 -0
- package/dashboard/js/command-center.js +8 -6
- 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,10 +155,12 @@ async function ccSend() {
|
|
|
158
155
|
_renderQueueIndicator();
|
|
159
156
|
return;
|
|
160
157
|
}
|
|
161
|
-
await _ccDoSend(message);
|
|
158
|
+
const wasAborted = await _ccDoSend(message);
|
|
159
|
+
|
|
160
|
+
// Brief pause after abort — gives server time to release ccInFlight guard
|
|
161
|
+
if (wasAborted && _ccQueue.length > 0) await new Promise(r => setTimeout(r, 500));
|
|
162
162
|
|
|
163
|
-
// Drain queue —
|
|
164
|
-
// Queue is cleared by ccAbort() if user stops mid-stream
|
|
163
|
+
// Drain queue — send each queued message in order
|
|
165
164
|
while (_ccQueue.length > 0) {
|
|
166
165
|
const next = _ccQueue.shift();
|
|
167
166
|
_renderQueueIndicator();
|
|
@@ -208,6 +207,7 @@ async function _ccDoSend(message, skipUserMsg) {
|
|
|
208
207
|
|
|
209
208
|
_ccSending = true;
|
|
210
209
|
_ccAbortController = new AbortController();
|
|
210
|
+
let _wasAborted = false;
|
|
211
211
|
try { localStorage.setItem('cc-sending', JSON.stringify({ sending: true, startedAt: Date.now() })); } catch {}
|
|
212
212
|
|
|
213
213
|
if (!skipUserMsg) ccAddMessage('user', escHtml(message));
|
|
@@ -359,6 +359,7 @@ async function _ccDoSend(message, skipUserMsg) {
|
|
|
359
359
|
} catch (e) {
|
|
360
360
|
if (streamDiv?.parentNode) { clearInterval(phaseTimer); streamDiv.remove(); }
|
|
361
361
|
if (e.name === 'AbortError') {
|
|
362
|
+
_wasAborted = true;
|
|
362
363
|
if (streamedText) {
|
|
363
364
|
const ccElapsed = Math.round((Date.now() - ccStartTime) / 1000);
|
|
364
365
|
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 +383,7 @@ async function _ccDoSend(message, skipUserMsg) {
|
|
|
382
383
|
// Show notification badge on CC button if drawer is closed
|
|
383
384
|
if (!_ccOpen) showNotifBadge(document.getElementById('cc-toggle-btn'));
|
|
384
385
|
}
|
|
386
|
+
return _wasAborted;
|
|
385
387
|
}
|
|
386
388
|
|
|
387
389
|
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.628",
|
|
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"
|