Inline diff (Cmd+K)
Select code, press ⌘K (or Ctrl+K), describe a change, see it inline before accepting.
How to trigger
- In the editor, select the code you want to change. (Selecting nothing edits the whole file.)
- Press
⌘K/Ctrl+K. - A small input appears below the selection. Type your instruction:
`` convert this to async/await ``
- Press Enter. The agent generates the change and renders it inline:
- Removed lines crossed out in red.
- New lines added in green.
- Press
⌘Enter(or click Accept) to apply, orEsc(or Reject) to dismiss.
What you can ask for
This is meant for bounded, local edits — a single function, a block, a snippet. Good prompts:
- *convert to async/await*
- *add type annotations*
- *extract this loop into a helper function*
- *write a docstring*
- *handle the case where x is None*
For multi-file changes, use the Planner instead.
What's different from the planner
| Inline diff | Planner |
|---|---|
| One file, one place. | Many files. |
| Diff is shown inline. | Diff goes to Changes panel. |
| Apply is one click. | Hunk-by-hunk review. |
| No rollback receipt by default. | Always creates a receipt. |
| Cheap router model. | Tier-routed by complexity. |
When to use which
- Inline diff: quick local refactors, in-file rewrites, "make this nicer".
- Planner: anything that touches multiple files, anything you'd want a record of.
Behavior on rejection
Reject discards both the suggested change and the request. No receipt is written. The original code stays exactly as it was.
Cost
Inline diff uses the cheap router tier. Typical cost: a fraction of a cent per accepted edit. Shown in the budget panel under "inline".