Promote: SVG gen + office tools + v2 code-canvas - #357
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Promotes SVG generation (#355), office executors (csv-dedupe/CSV↔Excel/word-count) and the v2 sandboxed code-canvas (#356) to production.