העמוד הזה עוד לא תורגם; מוצגת הגרסה באנגלית.

בטא בקרוב. הפיצ׳ר עדיין בפיתוח, ולכן שמות ופרטים עשויים להשתנות לפני השחרור.

Inline edit

Select some code, press ⌘K (Ctrl+K on Windows and Linux), and say what to change. The model rewrites just those lines, and you review the result right in the editor.

Start an inline edit

  1. Select the lines you want to change.
  2. Press ⌘K (Ctrl+K), or right-click and choose Edit Selection with Agent…, or run Agents: Edit Selection with Agent….
  3. Type the change in the prompt above the selection, for example handle an empty list or convert to async/await.
  4. Press Enter to generate, or Esc to close.

With no selection, ⌘K still opens Commit… as usual (Git workflow).

The selection always covers whole lines. The model also sees 30 lines above and below, so the rewrite fits the code around it.

Review the result

While the model works the prompt shows Generating edit…. The change then appears as an inline diff: removed lines in red above the new ones, with Accept and Reject on each change.

ActionShortcut
AcceptCtrl+Y
RejectCtrl+N
Previous / next change⌥↑ / ⌥↓

Ctrl+Y and Ctrl+N use the Control key on macOS too. The bar at the bottom right of the editor shows the file, the + / − counts and the same buttons.

Which model

Inline edit uses the model selected in your current agent chat. With Auto, Ingot picks its default model.

MessageMeaning
No model connected. Sign in or connect a model in Models, then try again.there's no model to call
The model proposed no changes.the reply matched your code
Every inline edit is saved in Local history before and after, so you can always go back.

In-file agent mode

Prefer to stay in the code? Agents: Toggle In-File Agent Mode (⇧⌘; / Ctrl+Shift+;) hides the chat panel and lets you ask the agent right where you are:

  1. Click a line number. An Ingot ✦ icon appears in the gutter on that line.
  2. Click the icon. A card opens above the line.
  3. Type what you want, for example round once at the end or add a test for this in cart.test.ts, and press Enter.

Unlike an inline edit, this is a full agent run: it can read and search the project and change this file or any other. The card shows Working…, Investigating… or Editing cart.ts… while it runs, with Stop. When the agent asks a question, the card shows it with its options as buttons, or you can type an answer. When it finishes, the edits are waiting for review in the editor, and Open in chat shows the whole conversation. Esc closes the card.

The in-file card above line 2 of cart.ts: Ingot asks whether to round each line or only the total, with the two options as buttonsThe in-file card above line 2 of cart.ts: Ingot asks whether to round each line or only the total, with the two options as buttons
The in-file card above line 2 of cart.ts: Ingot asks whether to round each line or only the total, with the two options as buttons
The in-file card after the run: Done, review the changes in the editor, with Open in chat, and the proposed change shown inline belowThe in-file card after the run: Done, review the changes in the editor, with Open in chat, and the proposed change shown inline below
The in-file card after the run: Done, review the changes in the editor, with Open in chat, and the proposed change shown inline below

Ask Agent at This Line (⌥⌘' / Ctrl+Alt+') opens the card at the caret without the mouse. When a selection covers the line, the selection goes with the request; otherwise 20 lines either side do. Turn the mode off with the same command, and the chat comes back.