@chenacc/agentbridge 0.2.5 → 0.2.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chenacc/agentbridge",
3
- "version": "0.2.5",
3
+ "version": "0.2.6",
4
4
  "description": "Control local coding agents from a phone through a secure WeChat QR web console.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -332,7 +332,10 @@ function inputEntry(event, options, settledOutcome) {
332
332
  * full turned one request into a wall of overlapping drafts on a phone screen.
333
333
  */
334
334
  function collapsedEntry(event, label, summary, text, className, options) {
335
- const cached = cachedEntry(options.cache, event);
335
+ // A streaming row changes on every chunk, so it must never be cached — caching it
336
+ // froze the collapsed text at the first batch while the answer kept growing.
337
+ const stable = event.kind !== "message.delta";
338
+ const cached = stable ? cachedEntry(options.cache, event) : null;
336
339
  if (cached) return cached;
337
340
  const content = renderMessageMarkdown(String(text ?? ""), options.math ? { math: options.math } : undefined);
338
341
  const entry = {
@@ -340,7 +343,7 @@ function collapsedEntry(event, label, summary, text, className, options) {
340
343
  className,
341
344
  html: `<time class="event-time">${formatTime(event.time, options.formatMessageTime)}</time><div class="event-body"><strong>${escapeHtml(label)}</strong><details class="step-detail"><summary>${escapeHtml(summary)}</summary><div class="message-markdown">${content}</div></details></div>`,
342
345
  };
343
- return rememberEntry(options.cache, event, entry);
346
+ return stable ? rememberEntry(options.cache, event, entry) : entry;
344
347
  }
345
348
 
346
349
  /** Turn a session's events into the list of transcript entries to display. */