diff --git a/docs/docs_map.md b/docs/docs_map.md index 05c124e44458..50d42b69b621 100644 --- a/docs/docs_map.md +++ b/docs/docs_map.md @@ -9094,6 +9094,7 @@ Do not edit it by hand; run `pnpm docs:map:gen`. - H2: Syntax highlighting - H2: Output details contract - H3: Collapsed unchanged sections + - H3: Multi-file navigation - H2: Plugin defaults - H3: Persistent viewer URL config - H2: Security config diff --git a/docs/tools/diffs.md b/docs/tools/diffs.md index 5f12b0a84f80..4474c9f48ed6 100644 --- a/docs/tools/diffs.md +++ b/docs/tools/diffs.md @@ -221,6 +221,10 @@ All successful results include `changed`: identical before/after input returns ` The viewer shows rows like `N unmodified lines`. Expand controls only appear when the rendered diff has expandable context data (typical for before/after input). Many unified patches omit context bodies in their hunks, so the row can appear without an expand control -- expected, not a bug. `expandUnchanged` only applies when expandable context exists. +### Multi-file navigation + +Patches that touch more than one file start with a changed-files summary card: total `+N` / `-N` counts, per-file counts, added/deleted/renamed badges, and anchor links that jump to each file. Rendered PNG/PDF files keep the per-file header counts but drop the interactive view toggles, since those are dead controls in a static file. + ## Plugin defaults Set plugin-wide defaults in `~/.openclaw/openclaw.json`: diff --git a/extensions/diffs/README.md b/extensions/diffs/README.md index fdd80b32ff3e..be7a5710575e 100644 --- a/extensions/diffs/README.md +++ b/extensions/diffs/README.md @@ -225,6 +225,8 @@ diff --git a/src/example.ts b/src/example.ts ## Notes +- Multi-file patches start with a changed-files summary card: totals, per-file `+N`/`-N` stats, change badges, and anchor links. +- Rendered PNG/PDF files keep the per-file header counts but omit the interactive view toggles. - The viewer is hosted locally through the gateway under `/plugins/diffs/...`. - Artifacts are ephemeral and stored in the plugin temp subfolder (`$TMPDIR/openclaw-diffs`). - Default viewer URLs use loopback (`127.0.0.1`) unless you set plugin `viewerBaseUrl`, pass `baseUrl`, or use `gateway.bind=custom` + `gateway.customBindHost`. diff --git a/extensions/diffs/src/render.test.ts b/extensions/diffs/src/render.test.ts index 9200b8fc1a4e..b8c7b1139598 100644 --- a/extensions/diffs/src/render.test.ts +++ b/extensions/diffs/src/render.test.ts @@ -40,6 +40,9 @@ describe("renderDiffDocument", () => { expect(rendered.html).toContain("--diffs-line-height: 24px;"); expect(rendered.html).toContain("--diffs-font-size: 15px;"); expect(rendered.html).not.toContain("fonts.googleapis.com"); + expect(rendered.html).not.toContain('