Agentfly

The assistant

Edit with AI

The assistant · 2 min read

Select code, press Ctrl+E and say what to change. The rewrite appears in place, highlighted green under the struck-out original, for you to accept or reject.

When you would want it

Small changes should not need a conversation. Adding error handling, renaming across a function or converting a loop happens where you are looking, and nothing reaches disk until you save.

Where to find it

  • All Features → Edit with AI
  • Edit with AI
  • Keyboard → Ctrl+E

What you get out of it

  • Small edits never leave the code: no conversation, no copy and paste, no switching panels.
  • You see exactly what changed before you keep it, and one key undoes it after.
  • Nothing reaches disk until you save, the same review-first promise the assistant makes for bigger work.
  • It uses whichever model you connected, including local ones, and sends only the selection plus the code around it.

How to use it, step by step

  1. Open a file in Code mode and select the lines you want changed. To generate new code instead, just put the cursor where it should go.
  2. Press Ctrl+E, or right-click and choose Agentfly: Edit with AI. A prompt bar opens right above the selection and pushes the code down rather than covering it.
  3. Type what you want - "add input validation", "convert this to async/await", "handle the empty list" - and press Enter.
  4. The rewrite lands in place, highlighted green, with the lines it replaced shown struck through above it so you can compare at a glance.
  5. Press Ctrl+Enter or Accept to keep it. Press Esc or Reject to put the original back exactly.
  6. Not quite right? Type a follow-up such as "also log the error" and press Enter to refine the result without starting over.
  7. Save when you are happy. Until then it is an ordinary unsaved change, and Ctrl+Z undoes it.

Why this beats the usual way

Inline edit is the feature people switch editors for, and elsewhere it is often a paid extra tied to one vendor's models. In Agentfly it is built in, works with the model you already connected, and shows the replaced lines beside the rewrite instead of asking you to trust a silent swap. Unlike a chat answer you paste yourself, the change is exact, undoable and scoped to what you selected.

Shortcut

Ctrl+E

Find it in Universal Search

Edit with AI · The assistant · ctrl+e · inline edit · cmd+k · ctrl+k · rewrite selection · inline chat · edit in place · ai refactor · generate code here