@yemi33/minions 0.1.267 → 0.1.268

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,12 @@
1
1
  # Changelog
2
2
 
3
- ## 0.1.267 (2026-04-03)
3
+ ## 0.1.268 (2026-04-03)
4
4
 
5
5
  ### Features
6
6
  - CC streaming shows cumulative tool list with loading dots
7
7
 
8
8
  ### Fixes
9
+ - process remaining SSE buffer after stream ends + fallback finalization
9
10
  - Thinking... indicator shows alongside tool calls until text arrives
10
11
  - use safeJson instead of JSON.parse(safeRead()) in trigger-verify handler
11
12
 
@@ -258,6 +258,38 @@ async function _ccDoSend(message, skipUserMsg) {
258
258
  } catch { /* incomplete JSON */ }
259
259
  }
260
260
  }
261
+ // Process any remaining buffered data after stream ends
262
+ if (buf.trim()) {
263
+ for (const line of buf.split('\n')) {
264
+ if (!line.startsWith('data: ')) continue;
265
+ try {
266
+ const evt = JSON.parse(line.slice(6));
267
+ if (evt.type === 'done') {
268
+ streamDiv.remove();
269
+ _ccMessages.pop();
270
+ const ccElapsed = Math.round((Date.now() - ccStartTime) / 1000);
271
+ const rendered = renderMd(evt.text || streamedText || '');
272
+ 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>');
273
+ if (evt.sessionId) { _ccSessionId = evt.sessionId; ccSaveState(); ccUpdateSessionIndicator(); }
274
+ if (evt.actions && evt.actions.length > 0) {
275
+ for (const action of evt.actions) { await ccExecuteAction(action); }
276
+ }
277
+ } else if (evt.type === 'chunk') {
278
+ streamedText = evt.text;
279
+ updateStreamDiv();
280
+ }
281
+ } catch {}
282
+ }
283
+ }
284
+ // If stream ended without a 'done' event, finalize with whatever we have
285
+ if (streamDiv.parentNode) {
286
+ streamDiv.remove();
287
+ _ccMessages.pop();
288
+ if (streamedText) {
289
+ const ccElapsed = Math.round((Date.now() - ccStartTime) / 1000);
290
+ ccAddMessage('assistant', renderMd(streamedText) + '<div style="font-size:9px;color:var(--muted);margin-top:6px;display:flex;justify-content:flex-end;padding-right:30px">' + ccElapsed + 's</div>');
291
+ }
292
+ }
261
293
  } catch (e) {
262
294
  clearInterval(ccTimer);
263
295
  try { thinking.remove(); } catch { /* may already be removed */ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.267",
3
+ "version": "0.1.268",
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"