Skip to content

Promote: SVG gen + office tools + v2 code-canvas - #357

Merged
slaveofcode merged 5 commits into
mainfrom
develop
Aug 28, 2026
Merged

Promote: SVG gen + office tools + v2 code-canvas#357
slaveofcode merged 5 commits into
mainfrom
develop

Conversation

@slaveofcode

Copy link
Copy Markdown
Owner

Promotes SVG generation (#355), office executors (csv-dedupe/CSV↔Excel/word-count) and the v2 sandboxed code-canvas (#356) to production.

Add a generative executor (mapped to svg-viewer): the LLM writes <svg> markup for
an icon/logo/diagram, we sanitize it (DOMPurify SVG profile — strips scripts,
handlers, foreignObject) and return a rendered, downloadable graphic. New
svg-gen.lib (extractSvg/sanitizeSvg/svgToDataUrl). Chat previews now keep aspect
ratio (max-h-64) so diagrams aren't squished.
feat(agent): SVG generation — the model draws icons & diagrams
… word count

Add csv-dedupe (remove duplicate rows), spreadsheet-convert (CSV<->xlsx via
SheetJS, auto-detects direction), and word-count (words/chars/reading time). They
chain: 'remove duplicate rows from this csv and give me an Excel file' runs
csv-dedupe -> spreadsheet-convert on the piped output. Decouples executor function
name from its page ref (new optional 'page' field) so several ops can map to one
tool page; adds a duplicate-name guard.
New canvas-draw executor: the LLM writes JS that draws on a 2D ctx; it runs in a
locked-down Web Worker (no DOM, no network — fetch/XHR/WebSocket/importScripts/
indexedDB/caches neutered; OffscreenCanvas only) with a 6s timeout enforced by
the main thread terminating the worker → returns a PNG. For charts, plots and
procedural/pixel graphics SVG can't express. extractCode/runCanvasCode/blobToDataUrl
in canvas-run.lib; sandbox in canvas-sandbox.worker.
feat(agent): office tools + v2 sandboxed code-canvas
@slaveofcode
slaveofcode merged commit 0ee6d37 into main Aug 28, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant