What it is
When you select whole lines in the editor — or drag a box over nodes in the flow pane, which is the same selection — a floating bar appears with three actions: Convert to process, AI edit (tooltip “Describe a change for the selected lines”) and Copy to chat. Copy to chat opens the panel and pins a chip above the message box that reads, for example, “Onboarding · L4–L9”, with the first selected line as a preview. The placeholder changes to “Describe the change for the selected lines…”.
Region-safe by construction
A message sent with a chip goes to a dedicated edit route. The model receives the document with the selection marked between <<<SELECTION>>> and <<<END SELECTION>>>, and is instructed to return only the replacement lines for that region — no markers, no commentary, no lines from outside it. Its rules are the chat’s rules in miniature: untouched lines verbatim, two-space indentation, a “.note TBD” for a value you did not give, .back targets that exist, .do and .go names taken from the document or your workspace, and never closing an .if that was opened outside the region. Runic then splices the reply into the exact line range on the client. A bad reply cannot touch text outside the selection, because the text outside the selection is never replaced. Your own message posts with a “[selection: ‘Onboarding’ L4–L9]” note so the range is on record.
The result arrives as a normal proposal: “Here’s the change for L4–L9 — nothing is applied until you say so:”, with the diff, Apply and Discard, the diagram preview, and a checkpoint once applied. If the reply equals what was there, the chat says “That part already does what you asked — no changes needed.” If the document changed since you selected: “That selection no longer matches the document — select again.”
Whole blocks travel together
The range is expanded to complete blocks before it is sent, the same rule the extraction feature uses. Select a .then line and its .if comes along; select an .if and its branches and .end come along. The floating bar shows how many lines were pulled in (“+2 to keep the block whole”), so the replacement always fits the structure around it.
Two ways to use a selection
The AI edit button on the same bar uses the same region-safe route but skips the chat: an instruction bar appears in the editor with the placeholder “Describe the change — e.g. require manager approval above 500”, the replacement shows as a “Suggested change” panel with +N/−N counts, a row diff and Discard / Apply, and after Apply the replaced lines flash, the structural check runs and an “AI edit applied” toast offers Undo for 15 seconds. Copy to chat is the version with a conversation around it — the proposal waits, previews in the diagram, and keeps a checkpoint.
What travels, and the limits
Selection context works on process documents in a signed-in session with a verified email. The route allows 30 requests an hour, shared with the inline AI edit (“AI edit limit reached — try again in an hour.”). Your instruction is read up to 4,000 characters. The selection must be non-empty (“Select the lines to change first.”) and at most 20,000 characters; a longer one is refused with “That selection is too long for one edit — select a smaller region.” rather than cut. For context the model sees the text before the selection in full when it is under 12,000 characters, otherwise the first 40 lines plus the nearest 6,000 characters with a marker saying earlier lines were omitted, and up to 6,000 characters after it. The reply budget follows the selection’s size. The route runs on the mid tier — Claude Sonnet 5 with thinking off — within a 120-second limit.
The chip is dropped when you switch documents, and if the document changed since you selected, the chat asks you to select again. One intent per message: attaching a file to import replaces the chip.
How to use it
- Select the linesDrag across whole lines in the editor, select one full line, or drag a box over nodes in the diagram.
- Press Copy to chatClick 💬 Copy to chat on the floating bar. The chat opens with a chip such as “Onboarding · L4–L9”.
- Describe the changeType in the box (“Describe the change for the selected lines…”) and press Enter. Click ✕ on the chip to detach it first if you changed your mind.
- Review the scoped diffThe reply is a diff limited to that range. Apply to write it in, Discard to drop it; the applied change keeps a ↩ Restore checkpoint.
Commands & shortcuts
| Copy to chat | pin the selected lines to the next message |
| AI edit | same region-safe edit, reviewed and applied in the editor, with a 15-second Undo |
| Convert to process | extract the selection into its own linked process |
| ✕ on the chip | detach the selection |
| Enter | send the scoped request |
| <<<SELECTION>>> … <<<END SELECTION>>> | how the model sees the region it may replace |
Tips
- Draw the selection on the diagram when that is where you noticed the problem — the bar offers the same actions.
- Keep the instruction about that region only. The model sees the document around the selection for context but can only return lines for the range.
- Ask for structure, not just wording: “turn this into an .if with a Yes and a No branch” — the block expansion keeps the result well-formed.
- On a document too long for a whole-document edit, a selection is the way through: the region is capped at 20,000 characters, not the document.
- If the chip vanished, you switched documents; select again in the document you meant.
Questions
Can the agent change lines outside my selection?
No. The route returns only replacement lines for the marked region and Runic splices them into that range; text outside it is carried over unchanged.
Why did my selection grow?
It was expanded to whole blocks so a .then never travels without its .if, and an .if never without its .end. The bar shows how many lines were added.
What is the difference between AI edit and Copy to chat?
Both use the same region-safe route and the same 30-an-hour bucket. AI edit reviews and applies in the editor with a 15-second Undo; Copy to chat returns a proposal you review in the chat, preview in the diagram, and can restore later.
Which model runs the edit?
The mid tier: Claude Sonnet 5 with thinking off on Runic’s key, or the Main model you named on your own key.