@ai-setting/roy-plugin-task-show 2.0.6 → 2.0.7

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.
@@ -69,6 +69,21 @@ export interface RenderToolCallDetailOptions {
69
69
  /** The `data-tool-id` of the row this detail panel is rendering for. */
70
70
  currentCallId: string;
71
71
  }
72
+ /**
73
+ * v2.0.7 (Task #2706): tools that mutate a file on disk and therefore
74
+ * benefit from a Monaco + diff view. `read_file` is intentionally
75
+ * excluded — a task with 20+ read_file calls would otherwise mount
76
+ * 20+ Monaco placeholders, ballooning memory and causing the right-hand
77
+ * "View file" detail panel to overlap the inline editors below.
78
+ *
79
+ * Anything NOT in this set falls through to `renderSimpleHeader()`,
80
+ * which omits the monaco-editor / diff-body blocks entirely.
81
+ *
82
+ * Keep the set conservative: prefer false negatives (a write-style
83
+ * tool falls through to simple header) over false positives (a
84
+ * read-style tool mounts a Monaco editor we don't need).
85
+ */
86
+ export declare const VIEW_TOOLS: ReadonlySet<string>;
72
87
  /**
73
88
  * Compute an LCS-based line diff between `oldStr` and `newStr`.
74
89
  *
@@ -109,6 +124,17 @@ export declare function extractToolCallFiles(call: {
109
124
  *
110
125
  * The HTML always carries `data-current-call="<sequence>"` so the
111
126
  * client can locate it from a mermaid `__toolClick(N)` callback.
127
+ *
128
+ * v2.0.7 (Task #2706): conditional view rendering. Tools NOT in
129
+ * {@link VIEW_TOOLS} (most importantly `read_file`) skip the
130
+ * Monaco / diff block entirely — they only emit the header. Tools
131
+ * IN {@link VIEW_TOOLS} (write/edit variants) wrap their Monaco +
132
+ * diff block inside a `data-view-body` container that is collapsed
133
+ * by default (`hidden` attribute) and exposes a `data-view-toggle`
134
+ * button the user must click to expand. This eliminates the
135
+ * "20 read_files × full Monaco" memory pressure the user reported
136
+ * on Feishu (2026-08-03) and removes the layout overlap between
137
+ * the right-hand detail panel and the inline editors below.
112
138
  */
113
139
  export declare function renderToolCallDetail(call: ToolCallRecord, opts: RenderToolCallDetailOptions): string;
114
140
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"tool-call-detail.d.ts","sourceRoot":"","sources":["../src/tool-call-detail.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAMjD;;;;GAIG;AACH,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CACZ,MAAM,EACN;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAClE,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C,wEAAwE;IACxE,aAAa,EAAE,MAAM,CAAC;CACvB;AA0CD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,QAAQ,EAAE,CA6EtE;AAkBD;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE;IACzC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAChC,GAAG,MAAM,GAAG,IAAI,CAOhB;AAgCD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,cAAc,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oB,CAAC,IAAI,EAAE;IACzC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAChC,GAAG,MAAM,GAAG,IAAI,CAOhB;AAgCD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,cAAc,EACpB,IAAI,EAAE,2BAA2B,GAChC,MAAM,CA6ER;AAsDD;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,aAAa,CAAC,cAAc,CAAC,GACvC,YAAY,CA4Bd"}
@@ -68,6 +68,31 @@ const DIFF_NEW_ALIASES = [
68
68
  "to",
69
69
  "after",
70
70
  ];
71
+ /**
72
+ * v2.0.7 (Task #2706): tools that mutate a file on disk and therefore
73
+ * benefit from a Monaco + diff view. `read_file` is intentionally
74
+ * excluded — a task with 20+ read_file calls would otherwise mount
75
+ * 20+ Monaco placeholders, ballooning memory and causing the right-hand
76
+ * "View file" detail panel to overlap the inline editors below.
77
+ *
78
+ * Anything NOT in this set falls through to `renderSimpleHeader()`,
79
+ * which omits the monaco-editor / diff-body blocks entirely.
80
+ *
81
+ * Keep the set conservative: prefer false negatives (a write-style
82
+ * tool falls through to simple header) over false positives (a
83
+ * read-style tool mounts a Monaco editor we don't need).
84
+ */
85
+ export const VIEW_TOOLS = new Set([
86
+ "write_file",
87
+ "write",
88
+ "edit_file",
89
+ "edit",
90
+ "edit_file_v2",
91
+ "multi_edit_file",
92
+ "multi_edit",
93
+ "create_file",
94
+ "apply_patch",
95
+ ]);
71
96
  // ---------------------------------------------------------------------------
72
97
  // Diff algorithm
73
98
  // ---------------------------------------------------------------------------
@@ -240,10 +265,27 @@ function pickDiffNew(args) {
240
265
  *
241
266
  * The HTML always carries `data-current-call="<sequence>"` so the
242
267
  * client can locate it from a mermaid `__toolClick(N)` callback.
268
+ *
269
+ * v2.0.7 (Task #2706): conditional view rendering. Tools NOT in
270
+ * {@link VIEW_TOOLS} (most importantly `read_file`) skip the
271
+ * Monaco / diff block entirely — they only emit the header. Tools
272
+ * IN {@link VIEW_TOOLS} (write/edit variants) wrap their Monaco +
273
+ * diff block inside a `data-view-body` container that is collapsed
274
+ * by default (`hidden` attribute) and exposes a `data-view-toggle`
275
+ * button the user must click to expand. This eliminates the
276
+ * "20 read_files × full Monaco" memory pressure the user reported
277
+ * on Feishu (2026-08-03) and removes the layout overlap between
278
+ * the right-hand detail panel and the inline editors below.
243
279
  */
244
280
  export function renderToolCallDetail(call, opts) {
245
281
  const status = call.success ? "ok" : "fail";
246
282
  const filePath = extractToolCallFiles(call);
283
+ // v2.0.7: short-circuit for tools that don't need a view component.
284
+ // The header still carries tool name + status + path + file-link,
285
+ // but we skip the Monaco / diff block entirely.
286
+ if (!VIEW_TOOLS.has(call.toolName)) {
287
+ return renderSimpleHeader(call, opts, status, filePath);
288
+ }
247
289
  const oldStr = pickDiffOld(call.args);
248
290
  const newStr = pickDiffNew(call.args);
249
291
  const diffLines = oldStr !== null && newStr !== null ? computeDiff(oldStr, newStr) : null;
@@ -267,19 +309,69 @@ export function renderToolCallDetail(call, opts) {
267
309
  target="_blank"
268
310
  rel="noopener">View file</a>`
269
311
  : "";
312
+ // v2.0.7: wrap the Monaco + diff blocks inside a data-view-body
313
+ // container that is `hidden` by default. The toggle button flips
314
+ // `hidden` ↔ visible and updates its label between "View file"
315
+ // and "Hide view".
316
+ const viewBody = monacoBlock || diffBlock
317
+ ? `<div class="tool-call-view-body" data-view-body hidden>
318
+ ${monacoBlock}
319
+ ${diffBlock}
320
+ </div>`
321
+ : "";
322
+ const toggleButton = viewBody
323
+ ? `<button type="button"
324
+ class="tool-call-view-toggle"
325
+ data-view-toggle
326
+ aria-expanded="false"
327
+ aria-controls="view-body-${escapeHtmlAttr(opts.currentCallId)}">
328
+ <span class="tool-call-view-toggle-icon" aria-hidden="true">▶</span>
329
+ <span class="tool-call-view-toggle-label">View file</span>
330
+ </button>`
331
+ : "";
270
332
  return /* html */ `
271
333
  <section class="tool-call-detail"
272
334
  data-current-call="${escapeHtmlAttr(opts.currentCallId)}"
273
335
  data-tool-id="${escapeHtmlAttr(opts.currentCallId)}"
274
- data-tool-name="${escapeHtmlAttr(call.toolName)}">
336
+ data-tool-name="${escapeHtmlAttr(call.toolName)}"
337
+ data-has-view="${viewBody ? "true" : "false"}">
338
+ <header class="tool-call-header">
339
+ <span class="tool-name"><code>${escapeHtml(call.toolName)}</code></span>
340
+ <span class="badge badge-${status}">${escapeHtml(status)}</span>
341
+ <span class="tool-path">${escapeHtml(filePath ?? "")}</span>
342
+ ${fileLink}
343
+ ${toggleButton}
344
+ </header>
345
+ ${viewBody}
346
+ </section>
347
+ `.trim();
348
+ }
349
+ /**
350
+ * v2.0.7 (Task #2706): minimal header for tools that don't have a
351
+ * view component. Keeps the tool name, status badge, file path, and
352
+ * the inline "View file" API link (v0.6.9), but omits the Monaco
353
+ * placeholder + diff body. This is the cheap path for `read_file` and
354
+ * other non-mutating tools — saving ~one Monaco skeleton per row.
355
+ */
356
+ function renderSimpleHeader(call, opts, status, filePath) {
357
+ const fileLink = filePath
358
+ ? `<a class="file-link"
359
+ href="/api/file-content?path=${escapeHtmlAttr(encodeURIComponent(filePath))}"
360
+ target="_blank"
361
+ rel="noopener">View file</a>`
362
+ : "";
363
+ return /* html */ `
364
+ <section class="tool-call-detail tool-call-detail--simple"
365
+ data-current-call="${escapeHtmlAttr(opts.currentCallId)}"
366
+ data-tool-id="${escapeHtmlAttr(opts.currentCallId)}"
367
+ data-tool-name="${escapeHtmlAttr(call.toolName)}"
368
+ data-has-view="false">
275
369
  <header class="tool-call-header">
276
370
  <span class="tool-name"><code>${escapeHtml(call.toolName)}</code></span>
277
371
  <span class="badge badge-${status}">${escapeHtml(status)}</span>
278
372
  <span class="tool-path">${escapeHtml(filePath ?? "")}</span>
279
373
  ${fileLink}
280
374
  </header>
281
- ${monacoBlock}
282
- ${diffBlock}
283
375
  </section>
284
376
  `.trim();
285
377
  }
@@ -1 +1 @@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AAC;QAChB,KAAK,IAAI,CAAC;QACV,KAAK,MAAM,CAAC;QACZ,KAAK,KAAK;YACR,OAAO,OAAO,CAAC;QACjB,KAAK,KAAK,CAAC;QACX,KAAK,MAAM;YACT,OAAO,MAAM,CAAC;QAChB,KAAK,MAAM;YACT,OAAO,KAAK,CAAC;QACf,KAAK,KAAK;YACR,OAAO,KAAK,CAAC;QACf,KAAK,KAAK;YACR,OAAO,KAAK,CAAC;QACf;YACE,OAAO,WAAW,CAAC;IACvB,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"tool-call-detail.js","sourceRoot":"","sources":["../src/tool-call-detail.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AA0CH,8EAA8E;AAC9E,YAAY;AACZ,8EAA8E;AAE9E;;;;GAIG;AACH,MAAM,gBAAgB,GAAsB;IAC1C,WAAW;IACX,UAAU;IACV,MAAM;IACN,aAAa;IACb,KAAK;IACL,UAAU;CACX,CAAC;AAEF;;;;GAIG;AACH,MAAM,gBAAgB,GAAsB;IAC1C,YAAY;IACZ,SAAS;IACT,MAAM;IACN,QAAQ;CACT,CAAC;AACF,MAAM,gBAAgB,GAAsB;IAC1C,YAAY;IACZ,SAAS;IACT,IAAI;IACJ,OAAO;CACR,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,UAAU,GAAwB,IAAI,GAAG,CAAC;IACrD,YAAY;IACZ,OAAO;IACP,WAAW;IACX,MAAM;IACN,cAAc;IACd,iBAAiB;IACjB,YAAY;IACZ,aAAa;IACb,aAAa;CACd,CAAC,CAAC;AAEH,8EAA8E;AAC9E,iBAAiB;AACjB,8EAA8E;AAE9E;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,WAAW,CAAC,MAAc,EAAE,MAAc;IACxD,MAAM,QAAQ,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;IACpC,MAAM,QAAQ,GAAG,UAAU,CAAC,MAA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tB,KAAK,IAAI,CAAC;QACV,KAAK,KAAK,CAAC;QACX,KAAK,KAAK;YACR,OAAO,YAAY,CAAC;QACtB,KAAK,KAAK;YACR,OAAO,YAAY,CAAC;QACtB,KAAK,MAAM;YACT,OAAO,MAAM,CAAC;QAChB,KAAK,IAAI,CAAC;QACV,KAAK,UAAU;YACb,OAAO,UAAU,CAAC;QACpB,KAAK,KAAK;YACR,OAAO,KAAK,CAAC;QACf,KAAK,MAAM,CAAC;QACZ,KAAK,KAAK;YACR,OAAO,MAAM,CAAC;QAChB,KAAK,IAAI;YACP,OAAO,QAAQ,CAAC;QAClB,KAAK,IAAI;YACP,OAAO,MAAM,CAAC;QAChB,KAAK,IAAI;YACP,OAAO,IAAI,CAAC;QACd,KAAK,MAAM;YACT,OAAO,MAAM,CAAC;QAChB,KAAK,IAAI,CAAC;QACV,KAAK,MAAM,CAAC;QACZ,KAAK,KAAK;YACR,OAAO,OAAO,CAAC;QACjB,KAAK,KAAK,CAAC;QACX,KAAK,MAAM;YACT,OAAO,MAAM,CAAC;QAChB,KAAK,MAAM;YACT,OAAO,KAAK,CAAC;QACf,KAAK,KAAK;YACR,OAAO,KAAK,CAAC;QACf,KAAK,KAAK;YACR,OAAO,KAAK,CAAC;QACf;YACE,OAAO,WAAW,CAAC;IACvB,CAAC;AACH,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-setting/roy-plugin-task-show",
3
- "version": "2.0.6",
3
+ "version": "2.0.7",
4
4
  "description": "roy-agent plugin: visualize task solving process via tool call flow on a local web service",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
package/plugin.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-setting/roy-plugin-task-show",
3
- "version": "2.0.6",
3
+ "version": "2.0.7",
4
4
  "type": "tool-plugin",
5
5
  "description": "v2.0.0: Major visual overhaul of the per-task detail page \u2014 VS Code-style tool-call browser powered by Monaco Editor + LCS-based diff + project file tree with mermaid-driven navigation. The detail page now renders a 2-column layout: a sticky left sidebar with the project's git-tracked file tree (chevron-toggle directories, `is-affected` highlight for files touched by the current task), and a main column with the existing Mermaid + stats + toolcalls table + a new dedicated `<section id=\"tool-call-detail-panel\">` that hosts the LCS diff body + Monaco container for the currently-selected tool call. The legacy inline `<details class=\"diff-panel\">` (naive split-and-filter, prone to mis-tagging context lines) is replaced by `<ol class=\"diff-body\">` with proper added/removed/context markers driven by a real LCS dynamic-programming table (`computeDiff()` in `src/tool-call-detail.ts`). Tool calls with a file path get a Monaco Editor placeholder (`<div class=\"monaco-editor\" data-file-path=\"...\" data-language=\"...\">`) which the client-side `public/tool-call-detail.js` lazy-loads from `cdn.jsdelivr.net/npm/monaco-editor@0.45.0` the first time the user clicks a tool row. The Mermaid `__toolClick(toolId)` callback now drives THREE things: (a) the existing row scroll + highlight (preserved from v1.x), (b) the dedicated detail panel re-renders with the matching call, (c) the file-tree sidebar highlights the corresponding file (when `data-file-path` is present). New `GET /api/task/:id/file-tree` endpoint serves the git-tracked file list (`{ files: string[] }`) with a 30-second in-memory TTL + 8-entry FIFO bound. New modules: `src/file-tree.ts` (pure data layer: `buildFileTree / extractAffectedPaths / findNodeByPath / collectAllPaths / gitLsFiles / parseLsFiles`), `src/tool-call-detail.ts` (SSR + LCS diff + HTML escaping), `public/file-tree.js` (vanilla JS hydrator with chevron toggle + keyboard navigation + scrollIntoView), `public/tool-call-detail.js` (Monaco AMD loader + `__toolClick` wrapper + file-content fetch). New tests: `test/file-tree.test.ts` (21 cases \u2014 empty/single/nested/dedup/sort/depth/parseLsFiles/gitLsFiles), `test/tool-call-detail.test.ts` (22 cases \u2014 LCS diff edges, HTML escape, path aliases, summary stats), `test/tool-call-detail-server-integration.test.ts` (7 cases \u2014 SSR HTML contracts + endpoint), `test/tool-call-detail-jsdom.test.ts` (7 cases \u2014 client-side hydrators). v1.2.0: CSS context & packaged release hotfix. The plugin's public assets (notably `public/style.css`) and runtime adapters now correctly resolve relative to the installed package directory even when consumed via the published npm tarball. The session-scoped `TaskSessionStore` now preserves the full host session context (parent-child task links, plugin-handle id, env scope) across render cycles \u2014 previously the session was collapsed to its `sessionId` on first load and never refreshed, so the home page lost the \u300csession ancestors\u300d chain and external tasks from outside the current session silently disappeared from the tree. Adds `src/task-metadata.ts` as the single source of truth for the public `Task` shape exposed by `/api/tasks` + `/api/tasks/:id`, including the v1.0.0+ `processDescription` field, and re-exports it through the CLI adapters (`cli-tasks-adapter.ts` + `cli-tasks-tree-adapter.ts`) so the home page tree + the per-task page render against the same metadata contract. Bundles 244-line regression test (`test/context-and-packed-release.test.ts`) that boots the plugin from the **npm-pack** directory (not the repo working tree), spawns `roy-agent tasks get <id> --json`, and asserts (a) `public/style.css` is present and \u2265 64 lines, (b) the `/api/events` SSE endpoint survives a reload, and (c) `task.session` survives a render cycle. v1.1.0: Full Server-Sent Events realtime subscription across 3 event classes (task.created / operation.updated / tool.called) on both the home page and the per-task /task/<id> page. The per-task pipeline now subscribes to /api/events and patches the DOM in place on operation.updated \u2014 no more 5s-poll delay before the user sees a new milestone. The 'Task lifecycle pipeline' header badge is replaced by a 5-state SSE-aware badge (stale / connecting / live / reconnecting / error) so the user can tell at a glance whether real-time updates are flowing, the connection dropped, or 3+ consecutive errors triggered the polling fallback. Legacy boolean `stale` cache-TTL pill and `tool.recorded` event name are preserved for back-compat with v0.9.x / v1.0.0 clients. v1.0.0: First stable release. Replaces the v0.9.x fixture-based verify scripts (which built fake TaskOperationsEnvelope and never invoked the real `roy-agent` CLI, masking regressions in the public-schema `processDescription` field) with a real-CLI scenario test + verify (`test/process-description-real-scenario.test.ts` + `scripts/verify-v100-real-scenario.ts`) that spawns `roy-agent tasks get <id> --operations --json` via `defaultRunner` and asserts the API response carries `processDescription` end-to-end. The 0.9.9 processDescription fix is preserved verbatim \u2014 this release only swaps the verify surface. Visualize the tool call chain of a task on a local web service with real-time SSE updates. v0.9.9: Task lifecycle pipeline on /task/<id> now exposes BOTH the milestone badge AND the \u300c\u8fc7\u7a0b\u63cf\u8ff0\u300d column at a glance \u2014 the server-side `/api/tasks/:id/operations` endpoint exposes `processDescription` on every operation (no longer stripped from the public schema), the client-side `renderPipelineHtml` mirrors the server's `.op-desc-block` + `.op-proc-block` block layout so SSR \u2194 CSR stay in sync, and a long-standing CSS right-side text-truncation bug in the pipeline timeline (long CJK titles overflowing the panel edge) is fixed via `min-width: 0` on `.op-row1` + `overflow-wrap: anywhere` on `.op-title`. v0.9.0: Session-scoped home page (only show tasks created after plugin load + their external ancestors), with per-row \u300c\u663e\u793a\u5168\u90e8\u680f\u4f4d\u300d toggle and lazy-loaded operations timeline; per-task Mermaid labels now correctly render CJK / mixed-Latin / emoji text (encoded as \\uXXXX before emission, decoded by the browser); detail page layout reordered to lifecycle \u2192 pipeline \u2192 stats \u2192 toolcalls \u2192 rawjson. v0.5.0+: page refreshes stream over GET /api/events (Server-Sent Events). Subscribes to tool:before.execute, tool:after.execute, task:before.create, task:after.create, task:after.complete (preferred, 2026-07-10+), and task:after.update (legacy fallback). v0.6.11: Mermaid re-rendering is delegated to a self-contained controller (public/mermaid-renderer.js) that prevents the SVG\u2192raw-source regression on async updates and surfaces recoverable .mermaid-error states. v0.6.12: Task lifecycle pipeline (operations timeline) server now emits data-task-id on the pipeline section; client preserves it on swap, so the page actually fetches /api/tasks/<id>/operations and renders the 7-op timeline (previously silently bailed). v0.7.0: Home page redesigned as a hierarchical task tree (driven by `roy-agent tasks tree --json`); new /api/tasks/tree endpoint with status / priority / type / root-id filters, expand/collapse UI, search, and live 30s polling. v0.8.0: per-task page Mermaid area now renders the hierarchical 'Task lifecycle + tools' view \u2014 each operation record owns a subgraph that nests its tool calls, with click callbacks (`window.__toolClick`) that scroll-into-view + highlight + auto-expand the matching row in the tool-call table below. Operation record descriptions (`description` + `processDescription`) are now always rendered inline (no `<details>` collapse) so the user sees the lifecycle state at a glance; a fallback `<details>` kicks in only for descriptions longer than 600 chars. v0.8.1: hotfix for two pre-existing bugs in v0.8.0 (browser smoke test surfaced after merge). (a) Mermaid click directives were emitted as `click t1 __toolClick(1)` (missing `call` keyword) \u2014 Mermaid 10's parser rejects this with `got 'PS'`. Fixed to `click t1 call __toolClick(1)` (the v10 grammar requires `call` to invoke a callback with arguments). (b) `buildMermaidSource` lived inside the `attachTaskPageTimeline` IIFE but was also called from a listener in the `attachToolClickBridge` IIFE \u2014 sibling IIFEs cannot see each other's locals, so the listener threw `ReferenceError: buildMermaidSource is not defined` and the Mermaid diagram silently failed to re-render after `task-show:lifecycle-ops-loaded`. Fixed by hoisting the function (and its three helpers) to script top-level so both IIFEs can see it via the script-wide closure; the function is also exposed on `window.buildMermaidSource` for tests + tooling. v0.8.3: tree-display fix (Task #2426). The home page used to look like a flat list of root tasks because `autoExpandFirstLevels(..., 2)` only opened the first 2 levels \u2014 30/47 roots were leaf nodes and the remaining 17 collapsed to one level so grandchildren were never visible. Default expand depth is now 3 (root + child + grandchild + great-grandchild are visible on first paint), the summary line now shows per-depth count pills (root / child / grandchild / great-grandchild / level-N), each `tree-row` carries a `data-depth` attribute so CSS can paint coloured left rails per level, and the duplicated 'Live tool-call sessions (legacy view)' panel that made the page look like both a flat table AND a tree is now hidden behind `#legacy-sessions[hidden]` (kept for future debug-toggle restoration). v0.8.10: bug-fix release (Task #2537 + Task #2534). (a) Heap-bounded plugin caches: OperationsCache and TasksTreeCache now enforce a hard maxEntries cap (default 256 / 64). Oldest stale entries are evicted before inserting a new one, so long-lived roy-agent sessions (BackgroundTaskManager + MemorySessionStore) no longer leak Map entries through the plugin's per-task caches \u2014 see Task #2537 for the heap-unbounded-state RED\u2192GREEN repro. (b) Mermaid CJK font-family: server.ts renderTaskPage now configures mermaid.initialize({ themeVariables: { fontFamily: '\"PingFang SC\", \"Microsoft YaHei\", \"Noto Sans CJK SC\", \"Source Han Sans CN\", \"WenQuanYi Micro Hei\", sans-serif' } }) so Chinese node labels render correctly in browsers that have at least one of those fonts installed (see Task #2534).",
6
6
  "main": "dist/index.js",
@@ -422,6 +422,76 @@
422
422
  };
423
423
  }
424
424
 
425
+ // -----------------------------------------------------------------------
426
+ // v2.0.7 (Task #2706): view toggle handler
427
+ // -----------------------------------------------------------------------
428
+
429
+ /**
430
+ * Wire up every `[data-view-toggle]` button so clicking it flips
431
+ * the corresponding `[data-view-body]` between collapsed and
432
+ * expanded. Used by BOTH the dedicated `#tool-call-detail-panel`
433
+ * and any inline `<section class="tool-call-detail">` that ships
434
+ * with `data-has-view="true"`.
435
+ *
436
+ * The button is wired up once per button (idempotent via the
437
+ * `data-view-toggle-wired` guard). On toggle we:
438
+ * - flip the `hidden` attribute on the body container
439
+ * - update the button label between "View file" / "Hide view"
440
+ * - update the icon ▶ / ▼
441
+ * - when expanding for the first time, kick off Monaco
442
+ * hydration for the now-visible inline editor (was deferred
443
+ * while hidden to save memory)
444
+ *
445
+ * v2.0.7 background: read_file calls no longer ship a view
446
+ * component at all (no monaco-editor), so the toggle button is
447
+ * absent on those rows. Only write/edit-style tools get the
448
+ * toggle button + collapsed body.
449
+ */
450
+ function attachViewToggleHandlers() {
451
+ const toggles = document.querySelectorAll("[data-view-toggle]");
452
+ toggles.forEach((btn) => {
453
+ if (btn.getAttribute("data-view-toggle-wired") === "true") return;
454
+ btn.setAttribute("data-view-toggle-wired", "true");
455
+ btn.addEventListener("click", (event) => {
456
+ // Stop the click from bubbling up to a `<tr>` toggle.
457
+ event.preventDefault();
458
+ event.stopPropagation();
459
+ const scope = btn.closest("section.tool-call-detail");
460
+ if (!scope) return;
461
+ const body = scope.querySelector("[data-view-body]");
462
+ if (!body) return;
463
+ const wasHidden = body.hasAttribute("hidden");
464
+ if (wasHidden) {
465
+ body.removeAttribute("hidden");
466
+ btn.setAttribute("aria-expanded", "true");
467
+ const label = btn.querySelector(".tool-call-view-toggle-label");
468
+ if (label) label.textContent = "Hide view";
469
+ const icon = btn.querySelector(".tool-call-view-toggle-icon");
470
+ if (icon) icon.textContent = "▼";
471
+ // v2.0.7: now that the body is visible, kick off Monaco
472
+ // hydration for the editor inside. Idempotent — if it's
473
+ // already hydrated we return immediately.
474
+ const monacoContainer = body.querySelector(
475
+ ".monaco-editor[data-file-path]:not([data-monaco-hydrated='true'])",
476
+ );
477
+ if (monacoContainer) {
478
+ // Defer to a microtask so we don't block the click handler.
479
+ Promise.resolve().then(() => {
480
+ hydrateInlineMonaco(monacoContainer);
481
+ });
482
+ }
483
+ } else {
484
+ body.setAttribute("hidden", "");
485
+ btn.setAttribute("aria-expanded", "false");
486
+ const label = btn.querySelector(".tool-call-view-toggle-label");
487
+ if (label) label.textContent = "View file";
488
+ const icon = btn.querySelector(".tool-call-view-toggle-icon");
489
+ if (icon) icon.textContent = "▶";
490
+ }
491
+ });
492
+ });
493
+ }
494
+
425
495
  /**
426
496
  * Initial hydration: find the panel + install the __toolClick hook.
427
497
  * Idempotent.
@@ -434,6 +504,11 @@
434
504
  // "show args" / "show result" on a tool row hydrates the inline
435
505
  // monaco editor (skeleton → 5s timeout → <pre> fallback).
436
506
  attachInlineRowHydrators();
507
+ // v2.0.7 (Task #2706): wire up the new collapsed-by-default
508
+ // view toggle buttons. The body stays hidden until the user
509
+ // clicks the button, so we DON'T pre-hydrate the monaco-editor
510
+ // inside (saves memory when 20+ read_file rows are present).
511
+ attachViewToggleHandlers();
437
512
  // v2.0.5 (Task #2694): hydrate every visible inline Monaco on
438
513
  // initial boot. The inline editors are always visible on first
439
514
  // paint (the SSR ships them as siblings of the <details>