@ai-setting/roy-plugin-task-show 2.5.11 → 2.5.13
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/dist/chat-markdown-renderer.d.ts +63 -0
- package/dist/chat-markdown-renderer.d.ts.map +1 -0
- package/dist/chat-markdown-renderer.js +123 -0
- package/dist/chat-markdown-renderer.js.map +1 -0
- package/dist/collector.d.ts +11 -0
- package/dist/collector.d.ts.map +1 -1
- package/dist/collector.js +37 -12
- package/dist/collector.js.map +1 -1
- package/dist/file-tree.d.ts +57 -1
- package/dist/file-tree.d.ts.map +1 -1
- package/dist/file-tree.js +22 -2
- package/dist/file-tree.js.map +1 -1
- package/dist/file-viewer-utils.d.ts +76 -0
- package/dist/file-viewer-utils.d.ts.map +1 -0
- package/dist/file-viewer-utils.js +215 -0
- package/dist/file-viewer-utils.js.map +1 -0
- package/dist/logger.d.ts +59 -0
- package/dist/logger.d.ts.map +1 -0
- package/dist/logger.js +181 -0
- package/dist/logger.js.map +1 -0
- package/dist/mermaid-zoom-guardian.d.ts +77 -0
- package/dist/mermaid-zoom-guardian.d.ts.map +1 -0
- package/dist/mermaid-zoom-guardian.js +176 -0
- package/dist/mermaid-zoom-guardian.js.map +1 -0
- package/dist/plugin.d.ts +24 -10
- package/dist/plugin.d.ts.map +1 -1
- package/dist/plugin.js +79 -33
- package/dist/plugin.js.map +1 -1
- package/dist/server.d.ts +25 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +134 -8
- package/dist/server.js.map +1 -1
- package/dist/task-session-store.js +7 -0
- package/dist/task-session-store.js.map +1 -1
- package/dist/tool-call-detail.d.ts +18 -0
- package/dist/tool-call-detail.d.ts.map +1 -1
- package/dist/tool-call-detail.js +115 -7
- package/dist/tool-call-detail.js.map +1 -1
- package/package.json +2 -2
- package/plugin.json +2 -2
- package/public/app.js +18 -0
- package/public/index.html +7 -0
- package/public/markdown-preprocessor.js +89 -0
- package/public/markdown-renderer.js +29 -1
- package/public/mermaid-zoom-guardian.js +137 -0
- package/public/style.css +109 -0
package/dist/tool-call-detail.js
CHANGED
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
* output is XSS-safe: every user-supplied string is run through
|
|
36
36
|
* `escapeHtml()` before injection.
|
|
37
37
|
*/
|
|
38
|
+
import { renderWriteFileFull, renderEditFileDiff } from "./file-viewer-utils.js";
|
|
38
39
|
// ---------------------------------------------------------------------------
|
|
39
40
|
// Constants
|
|
40
41
|
// ---------------------------------------------------------------------------
|
|
@@ -93,6 +94,28 @@ export const VIEW_TOOLS = new Set([
|
|
|
93
94
|
"create_file",
|
|
94
95
|
"apply_patch",
|
|
95
96
|
]);
|
|
97
|
+
/**
|
|
98
|
+
* v2.5.12 (Task #2952): tools that write a whole-file content payload.
|
|
99
|
+
*
|
|
100
|
+
* For these tools the right-hand detail panel renders the FULL content
|
|
101
|
+
* of the file the tool just wrote (line-numbered, no truncation) rather
|
|
102
|
+
* than mounting a Monaco editor that loads the file from disk. The
|
|
103
|
+
* Monaco path was causing two user-reported issues:
|
|
104
|
+
*
|
|
105
|
+
* 1. The /api/file-content endpoint truncates very large files; the
|
|
106
|
+
* user saw only the first ~15 lines in the right panel.
|
|
107
|
+
* 2. Even when not truncated, Monaco never reflected what the tool
|
|
108
|
+
* call actually wrote — only what was on disk afterwards (which
|
|
109
|
+
* can differ if a later edit_file rewrote the same path).
|
|
110
|
+
*
|
|
111
|
+
* Anything else in {@link VIEW_TOOLS} (edit_file, multi_edit_file,
|
|
112
|
+
* apply_patch, etc.) keeps the existing diff/Monaco behavior.
|
|
113
|
+
*/
|
|
114
|
+
export const WRITE_FILE_TOOLS = new Set([
|
|
115
|
+
"write_file",
|
|
116
|
+
"write",
|
|
117
|
+
"create_file",
|
|
118
|
+
]);
|
|
96
119
|
// ---------------------------------------------------------------------------
|
|
97
120
|
// Diff algorithm
|
|
98
121
|
// ---------------------------------------------------------------------------
|
|
@@ -249,6 +272,23 @@ function pickDiffNew(args) {
|
|
|
249
272
|
}
|
|
250
273
|
return null;
|
|
251
274
|
}
|
|
275
|
+
/**
|
|
276
|
+
* v2.5.12 (Task #2952): pull the full file content from a
|
|
277
|
+
* write-style tool call's args. We accept the canonical `content`
|
|
278
|
+
* alias plus a couple of common variants so we stay robust to
|
|
279
|
+
* upstream renames.
|
|
280
|
+
*/
|
|
281
|
+
function pickWriteContent(args) {
|
|
282
|
+
if (!args)
|
|
283
|
+
return null;
|
|
284
|
+
const keys = ["content", "file_content", "body", "text"];
|
|
285
|
+
for (const key of keys) {
|
|
286
|
+
const v = args[key];
|
|
287
|
+
if (typeof v === "string")
|
|
288
|
+
return v;
|
|
289
|
+
}
|
|
290
|
+
return null;
|
|
291
|
+
}
|
|
252
292
|
// ---------------------------------------------------------------------------
|
|
253
293
|
// SSR HTML
|
|
254
294
|
// ---------------------------------------------------------------------------
|
|
@@ -286,9 +326,32 @@ export function renderToolCallDetail(call, opts) {
|
|
|
286
326
|
if (!VIEW_TOOLS.has(call.toolName)) {
|
|
287
327
|
return renderSimpleHeader(call, opts, status, filePath);
|
|
288
328
|
}
|
|
329
|
+
// v2.5.12 (Task #2952): write_file / write / create_file render the
|
|
330
|
+
// full content the tool actually wrote. Skip Monaco + diff and use
|
|
331
|
+
// the dedicated line-numbered renderer (no truncation, XSS-safe).
|
|
332
|
+
if (WRITE_FILE_TOOLS.has(call.toolName)) {
|
|
333
|
+
const writeContent = pickWriteContent(call.args);
|
|
334
|
+
if (writeContent !== null && filePath) {
|
|
335
|
+
return renderWriteFileView(call, opts, status, filePath, writeContent);
|
|
336
|
+
}
|
|
337
|
+
// Fall back to the existing Monaco path if the args don't carry a
|
|
338
|
+
// `content` field — e.g. an older tool variant we haven't mapped.
|
|
339
|
+
}
|
|
289
340
|
const oldStr = pickDiffOld(call.args);
|
|
290
341
|
const newStr = pickDiffNew(call.args);
|
|
291
342
|
const diffLines = oldStr !== null && newStr !== null ? computeDiff(oldStr, newStr) : null;
|
|
343
|
+
// v2.5.12 (Task #2952): edit_file / multi_edit_file / apply_patch /
|
|
344
|
+
// etc. prefer the dedicated diff renderer over the legacy
|
|
345
|
+
// <ol class="diff-body">. The new renderer highlights +/- with CSS
|
|
346
|
+
// classes and is consistent with the write_file view shape.
|
|
347
|
+
const editPath = filePath ?? "";
|
|
348
|
+
const editBlock = diffLines
|
|
349
|
+
? renderEditFileDiff({
|
|
350
|
+
path: editPath,
|
|
351
|
+
old_string: oldStr ?? "",
|
|
352
|
+
new_string: newStr ?? "",
|
|
353
|
+
})
|
|
354
|
+
: "";
|
|
292
355
|
const monacoBlock = filePath
|
|
293
356
|
? `<div class="monaco-editor"
|
|
294
357
|
data-file-path="${escapeHtmlAttr(filePath)}"
|
|
@@ -298,11 +361,6 @@ export function renderToolCallDetail(call, opts) {
|
|
|
298
361
|
<div class="monaco-placeholder">Monaco loading…</div>
|
|
299
362
|
</div>`
|
|
300
363
|
: "";
|
|
301
|
-
const diffBlock = diffLines
|
|
302
|
-
? `<ol class="diff-body" data-tool-id="${escapeHtmlAttr(opts.currentCallId)}">
|
|
303
|
-
${diffLines.map(renderDiffLine).join("")}
|
|
304
|
-
</ol>`
|
|
305
|
-
: "";
|
|
306
364
|
const fileLink = filePath
|
|
307
365
|
? `<a class="file-link"
|
|
308
366
|
href="/api/file-content?path=${escapeHtmlAttr(encodeURIComponent(filePath))}"
|
|
@@ -313,10 +371,10 @@ export function renderToolCallDetail(call, opts) {
|
|
|
313
371
|
// container that is `hidden` by default. The toggle button flips
|
|
314
372
|
// `hidden` ↔ visible and updates its label between "View file"
|
|
315
373
|
// and "Hide view".
|
|
316
|
-
const viewBody =
|
|
374
|
+
const viewBody = editBlock || monacoBlock
|
|
317
375
|
? `<div class="tool-call-view-body" data-view-body hidden>
|
|
376
|
+
${editBlock}
|
|
318
377
|
${monacoBlock}
|
|
319
|
-
${diffBlock}
|
|
320
378
|
</div>`
|
|
321
379
|
: "";
|
|
322
380
|
const toggleButton = viewBody
|
|
@@ -346,6 +404,56 @@ export function renderToolCallDetail(call, opts) {
|
|
|
346
404
|
</section>
|
|
347
405
|
`.trim();
|
|
348
406
|
}
|
|
407
|
+
/**
|
|
408
|
+
* v2.5.12 (Task #2952): render the right-hand detail panel for a
|
|
409
|
+
* write_file / write / create_file call. The body shows the FULL
|
|
410
|
+
* content the tool actually wrote — line-numbered, no truncation —
|
|
411
|
+
* AND the legacy Monaco placeholder (loads the file from disk for
|
|
412
|
+
* users who want to inspect the post-write state). Both live inside
|
|
413
|
+
* the same `data-view-body` collapsed-by-default container.
|
|
414
|
+
*/
|
|
415
|
+
function renderWriteFileView(call, opts, status, filePath, content) {
|
|
416
|
+
const fileViewer = renderWriteFileFull({ path: filePath, content });
|
|
417
|
+
const monacoBlock = `<div class="monaco-editor"
|
|
418
|
+
data-file-path="${escapeHtmlAttr(filePath)}"
|
|
419
|
+
data-language="${escapeHtmlAttr(detectLanguage(filePath))}"
|
|
420
|
+
data-readonly="true"
|
|
421
|
+
data-tool-id="${escapeHtmlAttr(opts.currentCallId)}">
|
|
422
|
+
<div class="monaco-placeholder">Monaco loading…</div>
|
|
423
|
+
</div>`;
|
|
424
|
+
const fileLink = `<a class="file-link"
|
|
425
|
+
href="/api/file-content?path=${escapeHtmlAttr(encodeURIComponent(filePath))}"
|
|
426
|
+
target="_blank"
|
|
427
|
+
rel="noopener">View file</a>`;
|
|
428
|
+
const viewBody = `<div class="tool-call-view-body" data-view-body hidden>
|
|
429
|
+
${fileViewer}
|
|
430
|
+
${monacoBlock}
|
|
431
|
+
</div>`;
|
|
432
|
+
const toggleButton = `<button type="button"
|
|
433
|
+
class="tool-call-view-toggle"
|
|
434
|
+
data-view-toggle
|
|
435
|
+
aria-expanded="false"
|
|
436
|
+
aria-controls="view-body-${escapeHtmlAttr(opts.currentCallId)}">
|
|
437
|
+
<span class="tool-call-view-toggle-icon" aria-hidden="true">▶</span>
|
|
438
|
+
<span class="tool-call-view-toggle-label">View file</span>
|
|
439
|
+
</button>`;
|
|
440
|
+
return /* html */ `
|
|
441
|
+
<section class="tool-call-detail"
|
|
442
|
+
data-current-call="${escapeHtmlAttr(opts.currentCallId)}"
|
|
443
|
+
data-tool-id="${escapeHtmlAttr(opts.currentCallId)}"
|
|
444
|
+
data-tool-name="${escapeHtmlAttr(call.toolName)}"
|
|
445
|
+
data-has-view="true">
|
|
446
|
+
<header class="tool-call-header">
|
|
447
|
+
<span class="tool-name"><code>${escapeHtml(call.toolName)}</code></span>
|
|
448
|
+
<span class="badge badge-${status}">${escapeHtml(status)}</span>
|
|
449
|
+
<span class="tool-path">${escapeHtml(filePath)}</span>
|
|
450
|
+
${fileLink}
|
|
451
|
+
${toggleButton}
|
|
452
|
+
</header>
|
|
453
|
+
${viewBody}
|
|
454
|
+
</section>
|
|
455
|
+
`.trim();
|
|
456
|
+
}
|
|
349
457
|
/**
|
|
350
458
|
* v2.0.7 (Task #2706): minimal header for tools that don't have a
|
|
351
459
|
* view component. Keeps the tool name, status badge, file path, and
|
|
@@ -1 +1 @@
|
|
|
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,cA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K,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IACnC,IAAI,GAAG,GAAG,CAAC;QAAE,OAAO,WAAW,CAAC;IAChC,MAAM,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC;IACjC,QAAQ,GAAG,EAAE,CAAC;QACZ,KAAK,IAAI;YACP,OAAO,YAAY,CAAC;QACtB,KAAK,KAAK;YACR,OAAO,YAAY,CAAC;QACtB,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"}
|
|
1
|
+
{"version":3,"file":"tool-call-detail.js","sourceRoot":"","sources":["../src/tool-call-detail.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-setting/roy-plugin-task-show",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.13",
|
|
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",
|
|
@@ -76,4 +76,4 @@
|
|
|
76
76
|
"name": "ai-setting",
|
|
77
77
|
"email": "ai-setting@users.noreply.github.com"
|
|
78
78
|
}
|
|
79
|
-
}
|
|
79
|
+
}
|
package/plugin.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-setting/roy-plugin-task-show",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.13",
|
|
4
4
|
"type": "tool-plugin",
|
|
5
5
|
"description": "v2.4.1: Mermaid zoom now supports click-and-drag pan (Task #2785). After zooming in, users can drag the diagram to view the surrounding canvas area. Implementation: per-container panState/dragState WeakMap (no global state leak); applyTransform(translate+scale) single-source-of-truth for the CSS transform; attachPanHandlers on pointerdown/move/up/cancel with setPointerCapture for off-element drags; pointer cursor switches to grab/grabbing with touch-action: none to prevent native scrolling; reset/zoomReset now also resets pan to (0,0). 14/14 new mermaid-pan tests pass, full suite 558/564 with 6 pre-existing failures unrelated to this commit. v2.4.0: Combines v2.3.0 Combines v2.3.0 (worktree-aware file-tree + unbounded Mermaid zoom, Task #2773) with the v2.3.0 mermaid placeholder expansion (Task #2771). Sidebar + endpoint scope git ls-files to session.context.worktree (fallback process.cwd()); Mermaid zoom-in is no longer capped at 3.0\u00d7; .mermaid placeholder is now min-height: 2400px and .mermaid-zoom-stage is min-width: 6400px / min-height: 2400px (5\u00d7 base, via --mermaid-placeholder-multiplier CSS custom property) so dense diagrams get enough canvas to pan/zoom comfortably. v2.3.0: Worktree-aware file tree sidebar + unbounded Mermaid zoom-in. The file-tree sidebar (and /api/task/:id/file-tree endpoint) now scope git ls-files to session.context.worktree when the host (task:before.create / task:after.create payload) supplies a worktree path, so the sidebar shows the files the agent is actually editing instead of the plugin process cwd. New resolveWorktreePath helper in src/file-tree.ts returns session.context.worktree (trimmed, with empty/non-string guard) or falls back to process.cwd() for backward compatibility with pre-v2.3.0 hosts. TypeScript: TaskSession gains an optional context?: { worktree?: string } field. TaskShowServer exposes getCollector() so tests can seed sessions with context.worktree set. The Mermaid zoom toolbar (introduced in v2.0.8) no longer caps zoom-in at 3.0\u00d7 \u2014 the ZOOM_MAX constant is REMOVED and clampZoom only enforces ZOOM_MIN=0.25, so dense diagrams remain readable on high-DPI monitors when the user wants to zoom way in. ZOOM_MIN stays in place so zoom-out still bottoms out before rendering a black screen. New tests: test/file-tree-worktree.test.ts (10 cases \u2014 resolveWorktreePath edges, SSR scope, endpoint scope, fallback), test/mermaid-zoom-unlimited.test.ts (8 cases \u2014 source guard, behaviour at 6\u00d7/10\u00d7/50\u00d7, lower-bound preserved), test/mermaid-placeholder-size.test.ts (7 cases \u2014 min-height/min-width 5\u00d7 checks, transform-origin preserved, --mermaid-placeholder-multiplier hint). v2.3.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",
|
|
@@ -89,4 +89,4 @@
|
|
|
89
89
|
},
|
|
90
90
|
"repository": "github:ai-setting/roy-plugin-task-visualize",
|
|
91
91
|
"bugs": "https://github.com/ai-setting/roy-plugin-task-visualize/issues"
|
|
92
|
-
}
|
|
92
|
+
}
|
package/public/app.js
CHANGED
|
@@ -640,6 +640,11 @@ if (typeof window !== "undefined") {
|
|
|
640
640
|
});
|
|
641
641
|
}
|
|
642
642
|
window.__mermaidController.update(mermaidDiv, source);
|
|
643
|
+
// v2.5.12 (Task #2951): install the zoom-stage guardian.
|
|
644
|
+
if (!window.__mermaidGuardian && window.MermaidZoomGuardian) {
|
|
645
|
+
window.__mermaidGuardian = new window.MermaidZoomGuardian.MermaidZoomGuardian(mermaidDiv);
|
|
646
|
+
window.__mermaidGuardian.start();
|
|
647
|
+
}
|
|
643
648
|
} else {
|
|
644
649
|
mermaidDiv.textContent = source;
|
|
645
650
|
}
|
|
@@ -657,6 +662,11 @@ if (typeof window !== "undefined") {
|
|
|
657
662
|
});
|
|
658
663
|
}
|
|
659
664
|
window.__mermaidController.update(mermaidDiv, source);
|
|
665
|
+
// v2.5.12 (Task #2951): install the zoom-stage guardian.
|
|
666
|
+
if (!window.__mermaidGuardian && window.MermaidZoomGuardian) {
|
|
667
|
+
window.__mermaidGuardian = new window.MermaidZoomGuardian.MermaidZoomGuardian(mermaidDiv);
|
|
668
|
+
window.__mermaidGuardian.start();
|
|
669
|
+
}
|
|
660
670
|
} else {
|
|
661
671
|
mermaidDiv.textContent = source;
|
|
662
672
|
}
|
|
@@ -789,6 +799,14 @@ if (typeof window !== "undefined") {
|
|
|
789
799
|
});
|
|
790
800
|
}
|
|
791
801
|
applyTaskUpdate._controller.update(mermaidDiv, source);
|
|
802
|
+
// v2.5.12 (Task #2951): install the zoom-stage guardian so
|
|
803
|
+
// Mermaid's late `mermaid.run()` (~T+3s) doesn't strip the
|
|
804
|
+
// `.mermaid-zoom-stage` wrapper that the controller just
|
|
805
|
+
// attached. Without this the pan/zoom UI silently breaks.
|
|
806
|
+
if (!applyTaskUpdate._guardian && window.MermaidZoomGuardian) {
|
|
807
|
+
applyTaskUpdate._guardian = new window.MermaidZoomGuardian.MermaidZoomGuardian(mermaidDiv);
|
|
808
|
+
applyTaskUpdate._guardian.start();
|
|
809
|
+
}
|
|
792
810
|
} else if (window.mermaid) {
|
|
793
811
|
// Mermaid is loaded but the controller script wasn't included —
|
|
794
812
|
// still try the safer mermaid.render(id, source) path with unique IDs.
|
package/public/index.html
CHANGED
|
@@ -113,9 +113,16 @@
|
|
|
113
113
|
is constructed, and both must register before markdown-renderer.js
|
|
114
114
|
resolves them at import time. chat-panel.js only depends on
|
|
115
115
|
window.markdownRenderer, which is set by markdown-renderer.js.
|
|
116
|
+
|
|
117
|
+
Task #2975: also load markdown-preprocessor.js (classic) so the
|
|
118
|
+
dash separators (em-dash repetition / 4-dash rule / bullet-prefixed dashes)
|
|
119
|
+
get normalized into real hr and bullet-list markup before handed to marked.
|
|
120
|
+
The preprocessor exposes itself as window.markdownPreprocessor;
|
|
121
|
+
markdown-renderer.js picks it up at first call.
|
|
116
122
|
-->
|
|
117
123
|
<script src="/static/marked.min.js" defer></script>
|
|
118
124
|
<script src="/static/dompurify.min.js" defer></script>
|
|
125
|
+
<script src="/static/markdown-preprocessor.js" defer></script>
|
|
119
126
|
<script src="/static/markdown-renderer.js" type="module" defer></script>
|
|
120
127
|
<script src="/static/chat-panel.js" type="module" defer></script>
|
|
121
128
|
</body>
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Browser-side pre-processor for assistant markdown.
|
|
3
|
+
*
|
|
4
|
+
* Task #2975: chat panel renders —— / ──── / • lists as a flat blob.
|
|
5
|
+
* This module normalizes those terminal-style separators into markers
|
|
6
|
+
* `marked` can render (HR placeholders + dash-bullets) so the chat
|
|
7
|
+
* bubble looks the same as the terminal output.
|
|
8
|
+
*
|
|
9
|
+
* The Node-side counterpart lives in `src/chat-markdown-renderer.ts`;
|
|
10
|
+
* the two implementations MUST stay byte-for-byte equivalent. If you
|
|
11
|
+
* change one, change the other.
|
|
12
|
+
*
|
|
13
|
+
* Public API:
|
|
14
|
+
* - normalizeAssistantText(text) → pre-processed string
|
|
15
|
+
* - renderAssistantMarkdown(text) → sanitized HTML
|
|
16
|
+
*
|
|
17
|
+
* Note: we wrap `renderAssistantMarkdown` here ONLY for unit tests in
|
|
18
|
+
* the browser. In production the chat panel calls `renderMarkdown`
|
|
19
|
+
* (from ./markdown-renderer.js) which itself calls normalize first.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
(function (root) {
|
|
23
|
+
'use strict';
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* @param {string} text
|
|
27
|
+
* @returns {string}
|
|
28
|
+
*/
|
|
29
|
+
function normalizeAssistantText(text) {
|
|
30
|
+
if (!text) return '';
|
|
31
|
+
var out = String(text);
|
|
32
|
+
|
|
33
|
+
// (a) Standalone 4+ dash line (──── or ----) → HR placeholder
|
|
34
|
+
out = out.replace(/(^|\n)[ \t]*[─-]{4,}[ \t]*\n?/g,
|
|
35
|
+
function (_m, lead) { return lead + '\n<hr class="chat-md-hr"/>\n'; });
|
|
36
|
+
|
|
37
|
+
// (b) Standalone `• ---` line → HR placeholder
|
|
38
|
+
out = out.replace(/(^|\n)[ \t]*•[ \t]*-{3,}[ \t]*\n?/g,
|
|
39
|
+
function (_m, lead) { return lead + '\n<hr class="chat-md-hr"/>\n'; });
|
|
40
|
+
|
|
41
|
+
// (c) Inline —— (em-dash repetition) → HR placeholder between paragraphs
|
|
42
|
+
out = out.replace(/——+/g, '<hr class="chat-md-em-dash"/>');
|
|
43
|
+
|
|
44
|
+
// (d) `• foo` at line-start → `- foo` (so marked makes it a real list)
|
|
45
|
+
out = out.replace(/(?:^|\n)[ \t]*•[ \t]+/g,
|
|
46
|
+
function (m) { return m.charAt(0) === '\n' ? '\n- ' : '- '; });
|
|
47
|
+
|
|
48
|
+
// (e) Strip [TaskEventHandler] sentinels (defence in depth)
|
|
49
|
+
out = out
|
|
50
|
+
.replace(/^\[TaskEventHandler\] Started\s*$/gm, '')
|
|
51
|
+
.replace(/^\[TaskEventHandler\] Stopped\s*$/gm, '');
|
|
52
|
+
|
|
53
|
+
// (f) Collapse 3+ blank lines down to one blank line
|
|
54
|
+
out = out.replace(/\n{3,}/g, '\n\n');
|
|
55
|
+
|
|
56
|
+
return out;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Browser-side render — uses globals `marked` and `DOMPurify` set
|
|
61
|
+
* by the vendor <script> tags in the index / detail pages.
|
|
62
|
+
*
|
|
63
|
+
* @param {string} text
|
|
64
|
+
* @returns {string} sanitized HTML
|
|
65
|
+
*/
|
|
66
|
+
function renderAssistantMarkdown(text) {
|
|
67
|
+
if (text == null || text === '') return '';
|
|
68
|
+
var normalized = normalizeAssistantText(String(text));
|
|
69
|
+
var markedLib = (root && root.marked) || (typeof window !== 'undefined' && window.marked);
|
|
70
|
+
var DOMPurifyLib = (root && root.DOMPurify) || (typeof window !== 'undefined' && window.DOMPurify);
|
|
71
|
+
if (!markedLib || !DOMPurifyLib) {
|
|
72
|
+
// Defensive fallback when libs aren't loaded yet
|
|
73
|
+
return normalized;
|
|
74
|
+
}
|
|
75
|
+
var raw = markedLib.parse(normalized);
|
|
76
|
+
return DOMPurifyLib.sanitize(raw, {
|
|
77
|
+
ADD_ATTR: ['target', 'rel'],
|
|
78
|
+
ALLOWED_URI_REGEXP: /^(?:(?:https?|mailto):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i,
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// Browser global + UMD-ish exports for Node tests
|
|
83
|
+
var api = { normalizeAssistantText: normalizeAssistantText, renderAssistantMarkdown: renderAssistantMarkdown };
|
|
84
|
+
if (typeof module !== 'undefined' && module.exports) {
|
|
85
|
+
module.exports = api;
|
|
86
|
+
} else if (root) {
|
|
87
|
+
root.markdownPreprocessor = api;
|
|
88
|
+
}
|
|
89
|
+
})(typeof globalThis !== 'undefined' ? globalThis : (typeof window !== 'undefined' ? window : null));
|
|
@@ -95,6 +95,30 @@ const SANITIZE_CONFIG = Object.freeze({
|
|
|
95
95
|
ALLOWED_URI_REGEXP: /^(?:(?:https?|mailto):|[^a-z]|[a-z+.-]+(?:[^a-z+.\-:]|$))/i,
|
|
96
96
|
});
|
|
97
97
|
|
|
98
|
+
/**
|
|
99
|
+
* Task #2975: chat panel renders —— / ──── / • bullets as a flat blob.
|
|
100
|
+
* We lazily load the pre-processor if available; otherwise we fall back
|
|
101
|
+
* to the legacy mark+DOMPurify behaviour (so loading-order mishaps in
|
|
102
|
+
* older index.html files don't crash the renderer — they just degrade
|
|
103
|
+
* to the pre-Task #2975 rendering).
|
|
104
|
+
*/
|
|
105
|
+
function resolvePreprocessor() {
|
|
106
|
+
try {
|
|
107
|
+
// browser
|
|
108
|
+
if (typeof window !== "undefined" && window.markdownPreprocessor) {
|
|
109
|
+
return window.markdownPreprocessor;
|
|
110
|
+
}
|
|
111
|
+
if (typeof globalThis !== "undefined" && globalThis.markdownPreprocessor) {
|
|
112
|
+
return globalThis.markdownPreprocessor;
|
|
113
|
+
}
|
|
114
|
+
// node / bun
|
|
115
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
116
|
+
return require("./markdown-preprocessor.js");
|
|
117
|
+
} catch {
|
|
118
|
+
return null;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
98
122
|
/**
|
|
99
123
|
* Render a markdown string into sanitized HTML.
|
|
100
124
|
*
|
|
@@ -104,7 +128,11 @@ const SANITIZE_CONFIG = Object.freeze({
|
|
|
104
128
|
export function renderMarkdown(text) {
|
|
105
129
|
if (text == null) return "";
|
|
106
130
|
const { marked, DOMPurify } = resolveLibs();
|
|
107
|
-
const
|
|
131
|
+
const pre = resolvePreprocessor();
|
|
132
|
+
const source = pre && pre.normalizeAssistantText
|
|
133
|
+
? pre.normalizeAssistantText(String(text))
|
|
134
|
+
: String(text);
|
|
135
|
+
const raw = marked.parse(source);
|
|
108
136
|
return DOMPurify.sanitize(raw, SANITIZE_CONFIG);
|
|
109
137
|
}
|
|
110
138
|
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
/* ------------------------------------------------------------------------- */
|
|
2
|
+
/* roy-plugin-task-show — Mermaid zoom-stage guardian (v2.5.12 / Task #2951)*/
|
|
3
|
+
/* ------------------------------------------------------------------------- */
|
|
4
|
+
/**
|
|
5
|
+
* Self-contained browser-side mirror of `src/mermaid-zoom-guardian.ts`.
|
|
6
|
+
*
|
|
7
|
+
* Why this exists
|
|
8
|
+
* ---------------
|
|
9
|
+
* Mermaid's library auto-runs `mermaid.run({nodes})` once
|
|
10
|
+
* `startOnLoad: true` is set in `mermaid.initialize`. The auto-runner
|
|
11
|
+
* fires roughly 1.5–3 s after page load (Playwright trace 2026-08-12)
|
|
12
|
+
* and replaces the contents of every `.mermaid` element with a
|
|
13
|
+
* freshly-rendered SVG — including the wrapper our
|
|
14
|
+
* `MermaidRenderer` controller had just attached. After the
|
|
15
|
+
* replacement, the `.mermaid-zoom-stage` wrapper is gone and the
|
|
16
|
+
* pan/zoom handlers stop working.
|
|
17
|
+
*
|
|
18
|
+
* The guardian installs a `MutationObserver` on every `.mermaid`
|
|
19
|
+
* container on the page and re-wraps the SVG whenever the children
|
|
20
|
+
* change. The work is idempotent and cheap (one `querySelector` +
|
|
21
|
+
* one `appendChild` per change).
|
|
22
|
+
*
|
|
23
|
+
* Public API (browser global `window.MermaidZoomGuardian`):
|
|
24
|
+
*
|
|
25
|
+
* ensureMermaidZoomStage(container) → HTMLElement | null
|
|
26
|
+
* new MermaidZoomGuardian(container)
|
|
27
|
+
* .start() // attach observer + wrap current children
|
|
28
|
+
* .stop() // detach observer
|
|
29
|
+
*
|
|
30
|
+
* Why two forms
|
|
31
|
+
* -------------
|
|
32
|
+
* - `ensureMermaidZoomStage` is a one-shot wrapper for the SSR
|
|
33
|
+
* template's `<noscript>` style fallback path.
|
|
34
|
+
* - `MermaidZoomGuardian` is a long-lived watcher for diagrams
|
|
35
|
+
* that survive past the initial paint.
|
|
36
|
+
*
|
|
37
|
+
* The logic mirrors `src/mermaid-zoom-guardian.ts` so SSR + browser
|
|
38
|
+
* agree on what "wrapped" means.
|
|
39
|
+
*
|
|
40
|
+
* Author: dongzhaokun <gddzhaokun@gmail.com>
|
|
41
|
+
*/
|
|
42
|
+
|
|
43
|
+
(function (root, factory) {
|
|
44
|
+
const api = factory();
|
|
45
|
+
if (typeof module === "object" && module.exports) {
|
|
46
|
+
module.exports = api;
|
|
47
|
+
}
|
|
48
|
+
if (typeof root === "object" && root) {
|
|
49
|
+
root.MermaidZoomGuardian = api;
|
|
50
|
+
}
|
|
51
|
+
})(typeof window !== "undefined" ? window : typeof globalThis !== "undefined" ? globalThis : this, function () {
|
|
52
|
+
"use strict";
|
|
53
|
+
|
|
54
|
+
var STAGE_CLASS = "mermaid-zoom-stage";
|
|
55
|
+
|
|
56
|
+
function ensureMermaidZoomStage(container) {
|
|
57
|
+
if (!container || typeof container.querySelector !== "function") return null;
|
|
58
|
+
var existing = container.querySelector("." + STAGE_CLASS);
|
|
59
|
+
if (existing) return existing;
|
|
60
|
+
var svg = container.querySelector("svg");
|
|
61
|
+
if (!svg) return null;
|
|
62
|
+
|
|
63
|
+
var doc = container.ownerDocument;
|
|
64
|
+
var stage = doc.createElement("div");
|
|
65
|
+
stage.className = STAGE_CLASS;
|
|
66
|
+
stage.setAttribute("data-mermaid-zoom-stage", "true");
|
|
67
|
+
|
|
68
|
+
var fragment = doc.createDocumentFragment ? doc.createDocumentFragment() : null;
|
|
69
|
+
if (fragment) {
|
|
70
|
+
while (container.firstChild) {
|
|
71
|
+
fragment.appendChild(container.firstChild);
|
|
72
|
+
}
|
|
73
|
+
stage.appendChild(fragment);
|
|
74
|
+
} else {
|
|
75
|
+
while (container.firstChild) {
|
|
76
|
+
stage.appendChild(container.firstChild);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
container.appendChild(stage);
|
|
80
|
+
return stage;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function MermaidZoomGuardian(container) {
|
|
84
|
+
this.container = container;
|
|
85
|
+
this.observer = null;
|
|
86
|
+
this.scheduled = false;
|
|
87
|
+
}
|
|
88
|
+
MermaidZoomGuardian.prototype.start = function () {
|
|
89
|
+
if (this.observer) return;
|
|
90
|
+
ensureMermaidZoomStage(this.container);
|
|
91
|
+
var Observer = (typeof MutationObserver !== "undefined" && MutationObserver) ||
|
|
92
|
+
(this.container.ownerDocument && this.container.ownerDocument.defaultView && this.container.ownerDocument.defaultView.MutationObserver);
|
|
93
|
+
if (typeof Observer !== "function") return;
|
|
94
|
+
var self = this;
|
|
95
|
+
this.observer = new Observer(function (mutations) {
|
|
96
|
+
if (self.scheduled) return;
|
|
97
|
+
for (var i = 0; i < mutations.length; i++) {
|
|
98
|
+
var m = mutations[i];
|
|
99
|
+
if (m.type !== "childList") continue;
|
|
100
|
+
if (m.target !== self.container) continue;
|
|
101
|
+
if (m.addedNodes.length === 0 && m.removedNodes.length === 0) continue;
|
|
102
|
+
for (var j = 0; j < m.addedNodes.length; j++) {
|
|
103
|
+
var n = m.addedNodes[j];
|
|
104
|
+
if (n && n.nodeType === 1 && n.classList && n.classList.contains(STAGE_CLASS)) {
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
self.scheduled = true;
|
|
109
|
+
if (typeof queueMicrotask === "function") {
|
|
110
|
+
queueMicrotask(function () {
|
|
111
|
+
self.scheduled = false;
|
|
112
|
+
ensureMermaidZoomStage(self.container);
|
|
113
|
+
});
|
|
114
|
+
} else {
|
|
115
|
+
setTimeout(function () {
|
|
116
|
+
self.scheduled = false;
|
|
117
|
+
ensureMermaidZoomStage(self.container);
|
|
118
|
+
}, 0);
|
|
119
|
+
}
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
this.observer.observe(this.container, { childList: true });
|
|
124
|
+
};
|
|
125
|
+
MermaidZoomGuardian.prototype.stop = function () {
|
|
126
|
+
if (this.observer) {
|
|
127
|
+
this.observer.disconnect();
|
|
128
|
+
this.observer = null;
|
|
129
|
+
}
|
|
130
|
+
this.scheduled = false;
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
return {
|
|
134
|
+
ensureMermaidZoomStage: ensureMermaidZoomStage,
|
|
135
|
+
MermaidZoomGuardian: MermaidZoomGuardian,
|
|
136
|
+
};
|
|
137
|
+
});
|