How bruno-gs-dev/visual-ai-editor works
Visual AI Editor lets a developer select existing page elements, request natural-language edits, review and apply the result, then save source changes or hand framework changes to an agent. The browser client gathers selection and CSS context; the server routes edit requests to a configured AI provider and checks design tokens before returning output. Other documented capabilities include visual selection tools, undo/redo, design-system viewing and validation, framework integrations, and provider configuration. Some server internals and framework wiring were not sampled, so uncertain links are omitted or marked unverified.
Main entry points: server/index.ts HTTP API · providers/index.ts Provider registry · actions.ts Edit and review · core.ts Editor runtime
Components 22
Browser editor
- Editor runtime
src/core.ts - Element selection
src/selection.ts - Selection tools
src/tools.ts - Edit and review
src/actions.ts - UI localization
src/i18n.ts
Edit service
- HTTP API
server/index.ts - Surgical patching
lib/patch.ts - Agent handoff
server/index.ts
AI providers
- Provider registry
server/providers/index.ts - OpenAI adapter
server/providers/openai.ts - Anthropic adapter
server/providers/anthropic.ts - OpenCode adapter
server/providers/opencode.ts - Local agent
server/providers/local-agent.ts
Design system
- Palette validation
lib/design-tokens.ts - Design checks
lib/design-check.ts
Framework integrations
- React hook
react/useAIEditor.ts - Angular builder
angular-plugin/src/builder.ts - Source tagging
angular-plugin/src/transformer.ts
Other components
- Developer
- Start CLI
bin/cli.ts - Configured AI
- Project source
Connections 25
- Developer → Start CLI: starts editor
README.md - Start CLI → HTTP API: starts server
bin/cli.ts - Developer → Element selection: selects elements
README.md - Element selection → Selection tools: uses tools
- Editor runtime → Element selection: supports selection
src/selection.ts - Developer → Edit and review: requests edit
README.md - Edit and review → HTTP API: posts edit
src/actions.ts - HTTP API → Provider registry: resolves provider
server/index.ts - Provider registry → OpenAI adapter: dispatches
server/providers/index.ts - Provider registry → Anthropic adapter: dispatches
server/providers/index.ts - Provider registry → OpenCode adapter: dispatches
server/providers/index.ts - Provider registry → Local agent: dispatches
server/providers/index.ts - OpenAI adapter → Configured AI: sends prompt
- Anthropic adapter → Configured AI: sends prompt
- OpenCode adapter → Configured AI: sends prompt
- Local agent → Configured AI: runs agent
- HTTP API → Palette validation: checks palette
server/index.ts - Design checks → Project source: checks design
- HTTP API → Surgical patching: applies patches
server/index.ts - Edit and review → Project source: saves changes
src/actions.ts - Edit and review → HTTP API: requests handoff
src/actions.ts - HTTP API → Agent handoff: writes manifest
server/index.ts - React hook → Editor runtime: mounts editor
- Angular builder → Source tagging: transforms templates
angular-plugin/src/builder.ts - UI localization → Editor runtime: provides strings
src/i18n.ts