Select to edit
Select to edit lets you point at an element in the running preview instead of describing it. Reach for it when a prompt would otherwise start with "the second button on the left".
Quick start
Press Select to edit in the actions bar above the preview. The label reads Picking while it is active. Click the element you mean, then type what should change and send it. The prompt arrives with the element's selector and the file that probably draws it.
How it works
What a pick captures
A click records the surface the element is in, a CSS selector, the tag, the id, the classes and the visible text. It then scores every source file for those identifiers and names the best match as the probable file. A file earns points for the element's id, for each class, for the visible text and for matching the surface, so a popup button usually resolves to the popup's own script or page.
How the prompt carries it
In the terminal, the prompt line is prefilled with the element and its file, such as button#inc in popup.html - , and you type the change after it. In chat mode a chip above the prompt reads Editing followed by the element and its file, and the X button next to it clears the selection. On send, the answer's context tells the model that the request refers to this element and names the likely source file.
Picking turns off once the prompt is sent, so the next prompt is about the whole project again unless you pick again.
Reference
| Captured | Example |
|---|---|
| Surface | popup |
| Selector | button#inc |
| Tag, id and classes | button, inc, primary |
| Visible text | Add one |
| Probable file | popup.js |
When it fails
- The prompt reads
<element> at <selector>with no file. No source file scored for the element's identifiers. The selector still reaches the model, so name the file yourself in the prompt. - The chip or the prefilled line is from an earlier pick. The selection stays until you send a prompt or clear it. In chat mode press the X next to the chip. In the terminal clear the line and pick again.
Next
- Live preview for the surfaces you can pick in
- Terminal for the prompt the pick fills
- Chat mode for the chip and the structured answer