Skip to content

feat(agent): SVG generation — the model draws icons & diagrams - #355

Merged
slaveofcode merged 1 commit into
developfrom
feat/agent-svg-gen
Aug 28, 2026
Merged

feat(agent): SVG generation — the model draws icons & diagrams#355
slaveofcode merged 1 commit into
developfrom
feat/agent-svg-gen

Conversation

@slaveofcode

Copy link
Copy Markdown
Owner

A generative executor (mapped to svg-viewer): the LLM writes markup, we sanitize it (DOMPurify SVG profile) and return a rendered, downloadable graphic. Covers icons, logos, badges and simple diagrams. Chat previews keep aspect ratio.

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.
@slaveofcode
slaveofcode merged commit 32665fa into develop Aug 28, 2026
1 check passed
@slaveofcode
slaveofcode deleted the feat/agent-svg-gen branch August 28, 2026 18:14
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