@yemi33/minions 0.1.271 → 0.1.273

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 CHANGED
@@ -1,11 +1,13 @@
1
1
  # Changelog
2
2
 
3
- ## 0.1.271 (2026-04-03)
3
+ ## 0.1.273 (2026-04-03)
4
4
 
5
5
  ### Features
6
+ - sending a new CC message aborts the current request instead of queuing
6
7
  - CC streaming shows cumulative tool list with loading dots
7
8
 
8
9
  ### Fixes
10
+ - restore CC message queuing + scroll to queued message when processing
9
11
  - remove 'minions up' alias, keep 'minions restart' only
10
12
  - agent and engine usage tables both have 7 columns for alignment
11
13
  - streaming CC was popping user messages from _ccMessages
@@ -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,31 +110,33 @@ async function ccSend() {
109
110
  if (!message) return;
110
111
  input.value = '';
111
112
 
112
- // If already processing, queue the message and show it — it'll send when current finishes
113
+ // If already processing, queue the message
113
114
  if (_ccSending) {
114
115
  _ccQueue.push(message);
115
116
  ccAddMessage('user', escHtml(message));
116
- const preview = message.split(/\s+/).slice(0, 6).join(' ') + (message.split(/\s+/).length > 6 ? '...' : '');
117
- ccAddMessage('assistant', '<span class="cc-queued-pill" style="color:var(--muted);font-size:10px">Queued: "' + escHtml(preview) + '" — will send after current request</span>');
117
+ ccAddMessage('assistant', '<span class="cc-queued-pill" style="color:var(--muted);font-size:10px">Queued will send after current request</span>');
118
118
  return;
119
119
  }
120
120
  await _ccDoSend(message);
121
121
 
122
- // Drain queue
122
+ // Drain queue — process queued messages one by one
123
123
  while (_ccQueue.length > 0) {
124
124
  const next = _ccQueue.shift();
125
- // Remove the "Queued" placeholder for this message
125
+ // Remove the "Queued" pill for this message (user message bubble stays)
126
126
  const msgs = document.getElementById('cc-messages');
127
127
  const queuedPills = msgs.querySelectorAll('.cc-queued-pill');
128
128
  for (const pill of queuedPills) {
129
129
  if (pill.closest('div')) { pill.closest('div').remove(); break; }
130
130
  }
131
- await _ccDoSend(next, true); // skipUserMsg=true since already shown when queued
131
+ // Scroll to make the queued user message visible before processing
132
+ msgs.scrollTop = msgs.scrollHeight;
133
+ await _ccDoSend(next, true); // user message already shown when queued
132
134
  }
133
135
  }
134
136
 
135
137
  async function _ccDoSend(message, skipUserMsg) {
136
138
  _ccSending = true;
139
+ _ccAbortController = new AbortController();
137
140
  try { localStorage.setItem('cc-sending', JSON.stringify({ sending: true, startedAt: Date.now() })); } catch {}
138
141
 
139
142
  if (!skipUserMsg) ccAddMessage('user', escHtml(message));
@@ -178,7 +181,7 @@ async function _ccDoSend(message, skipUserMsg) {
178
181
  const res = await fetch('/api/command-center/stream', {
179
182
  method: 'POST', headers: { 'Content-Type': 'application/json' },
180
183
  body: JSON.stringify({ message }),
181
- signal: AbortSignal.timeout(960000)
184
+ signal: _ccAbortController ? _ccAbortController.signal : AbortSignal.timeout(960000)
182
185
  });
183
186
 
184
187
  if (!res.ok) {
@@ -297,6 +300,7 @@ async function _ccDoSend(message, skipUserMsg) {
297
300
  '<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
301
  } finally {
299
302
  _ccSending = false;
303
+ _ccAbortController = null;
300
304
  try { localStorage.removeItem('cc-sending'); } catch {}
301
305
  // Show notification badge on CC button if drawer is closed
302
306
  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.271",
3
+ "version": "0.1.273",
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"