Diffs
diffs is an optional plugin tool that renders a read-only diff from either:
- arbitrary
before/aftertext - a unified patch
- a gateway-hosted viewer URL for canvas use
- a PNG image for message delivery
- both outputs together
Enable the plugin
What agents get back
mode: "view"returnsdetails.viewerUrlanddetails.viewerPathmode: "image"returnsdetails.imagePathonlymode: "both"returns the viewer details plusdetails.imagePath
- open
details.viewerUrlin canvas withcanvas present - send
details.imagePathwith themessagetool usingpathorfilePath
Tool inputs
Before/after input:mode:view,image, orbothlayout:unifiedorsplittheme:lightordarkexpandUnchanged: expand unchanged sections instead of collapsing thempath: display name for before/after inputtitle: explicit diff titlettlSeconds: viewer artifact lifetimebaseUrl: override the gateway base URL used in the returned viewer link
Plugin defaults
Set plugin-wide defaults in~/.openclaw/openclaw.json:
fontFamilyfontSizelayoutwordWrapbackgroundthememode
Notes
- Viewer pages are hosted locally by the gateway under
/plugins/diffs/.... - Viewer artifacts are ephemeral and stored locally.
mode: "image"uses a faster image-only render path and does not create a viewer URL.- PNG rendering requires a Chromium-compatible browser. If auto-detection is not enough, set
browser.executablePath. - Diff rendering is powered by Diffs.