@yemi33/minions 0.1.261 → 0.1.263

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.261 (2026-04-03)
3
+ ## 0.1.263 (2026-04-03)
4
4
 
5
5
  ### Features
6
6
  - real-time token streaming for CC via partial JSON extraction
7
7
 
8
8
  ### Fixes
9
+ - all CC messages go through ccAddMessage — no more duplicated styling
10
+ - streaming CC done event includes copy button matching ccAddMessage
9
11
  - streaming CC message bubble matches ccAddMessage styling
10
12
  - CC stream clears ccInFlight on client disconnect + defensive thinking.remove
11
13
  - remove last evaluate references — eval loop now creates review items
@@ -190,14 +190,13 @@ async function _ccDoSend(message, skipUserMsg) {
190
190
  return;
191
191
  }
192
192
 
193
- // Create streaming message bubble
193
+ // Use a temporary streaming div for live updates, then replace with ccAddMessage on completion
194
194
  clearInterval(ccTimer);
195
195
  try { thinking.remove(); } catch { /* may already be removed */ }
196
- const streamDiv = document.createElement('div');
197
- streamDiv.className = 'cc-msg-assistant';
198
- streamDiv.style.cssText = 'padding:8px 12px;border-radius:8px;font-size:12px;line-height:1.6;max-width:95%;background:var(--surface2);color:var(--text);align-self:flex-start;border:1px solid var(--border);position:relative';
199
- streamDiv.innerHTML = '<span style="color:var(--muted);font-size:11px">Thinking...</span>';
200
- document.getElementById('cc-messages').appendChild(streamDiv);
196
+ // Add a temporary placeholder via ccAddMessage so it gets proper styling
197
+ ccAddMessage('assistant', '<span style="color:var(--muted);font-size:11px">Thinking...</span>', true);
198
+ const msgs = document.getElementById('cc-messages');
199
+ const streamDiv = msgs.lastElementChild; // the message we just added
201
200
  let streamedText = '';
202
201
 
203
202
  const reader = res.body.getReader();
@@ -215,22 +214,24 @@ async function _ccDoSend(message, skipUserMsg) {
215
214
  try {
216
215
  const evt = JSON.parse(line.slice(6));
217
216
  if (evt.type === 'chunk') {
218
- streamedText = evt.text; // each chunk is the full text so far for this turn
217
+ streamedText = evt.text;
219
218
  streamDiv.innerHTML = renderMd(streamedText);
220
- const msgs = document.getElementById('cc-messages');
221
219
  if (msgs.scrollHeight - msgs.scrollTop - msgs.clientHeight < 150) msgs.scrollTop = msgs.scrollHeight;
222
220
  } else if (evt.type === 'done') {
223
- // Final result replace with rendered markdown + actions
221
+ // Replace streaming div with a proper ccAddMessage
222
+ streamDiv.remove();
223
+ _ccMessages.pop(); // remove the placeholder we pushed
224
224
  const ccElapsed = Math.round((Date.now() - ccStartTime) / 1000);
225
- streamDiv.innerHTML = renderMd(evt.text || streamedText || '') +
226
- '<div style="font-size:9px;color:var(--muted);margin-top:6px;display:flex;justify-content:flex-end;padding-right:30px">' + ccElapsed + 's</div>';
227
- _ccMessages.push({ role: 'assistant', html: streamDiv.innerHTML });
225
+ const rendered = renderMd(evt.text || streamedText || '');
226
+ ccAddMessage('assistant', rendered + '<div style="font-size:9px;color:var(--muted);margin-top:6px;display:flex;justify-content:flex-end;padding-right:30px">' + ccElapsed + 's</div>');
228
227
  if (evt.sessionId) { _ccSessionId = evt.sessionId; ccSaveState(); ccUpdateSessionIndicator(); }
229
228
  if (evt.actions && evt.actions.length > 0) {
230
229
  for (const action of evt.actions) { await ccExecuteAction(action); }
231
230
  }
232
231
  } else if (evt.type === 'error') {
233
- streamDiv.innerHTML = '<span style="color:var(--red)">' + escHtml(evt.error) + '</span>';
232
+ streamDiv.remove();
233
+ _ccMessages.pop();
234
+ ccAddMessage('assistant', '<span style="color:var(--red)">' + escHtml(evt.error) + '</span>');
234
235
  }
235
236
  } catch { /* incomplete JSON */ }
236
237
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.261",
3
+ "version": "0.1.263",
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"