UI Context Picker #57434
gstangl
started this conversation in
Feature Requests
UI Context Picker
#57434
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Body
What are you proposing?
A visual DOM-to-context feature in Zed. Either a built-in browser pane next to the editor, or a tight integration with an external browser window. When I click on a rendered element in the running app, Zed automatically attaches the corresponding source (component file, JSX/HTML node, CSS/Tailwind classes) as context to the agent. From there I can describe the change in natural language and the edit lands in the right file.
Why does this matter?
Today, the loop between seeing something in the browser and editing it in code is slow:
With visual selection, this collapses to: click, type the change, done.
This matters because:
Are there any examples or context?
The best example is actually in Claude Code and the way I can visually pick elements in there
The gap: nobody has combined a super fast and lean real editor + capable agent + visual element picker.
Possible approach
A few directions, ordered by ambition:
External browser, lightweight: a Zed extension or browser companion (Chrome extension) that, on alt-click or similar, sends the element's source location and surrounding context to Zed's agent panel as an attached context item. React/Vue/Svelte already expose source location in dev mode via Fast Refresh / HMR metadata.
Built-in preview pane: a webview pane inside Zed showing localhost. Click on an element with a modifier key, and the corresponding source node + file gets added as agent context. Could piggyback on the existing
@-mention context system.Framework-aware mapping: for React/Vue/Svelte, use the existing source maps and component source location data that dev tools already rely on. For plain HTML/CSS, fall back to selector-based attachment.
The minimum viable version is probably (1): a browser extension that talks to Zed via a local socket and pushes context into the agent panel. That validates the workflow without requiring a full webview implementation.
Love what you're building. Zed is the only editor where the agent feels like a native citizen, not a bolted-on plugin. This feature would make it the obvious choice for anyone doing UI work.
Gerald
Beta Was this translation helpful? Give feedback.
All reactions