In VS Code with GitHub Copilot, when do you use editor inline chat instead of the Chat view, and what is each one scoped to?
answer
- where the prompt lands
- active editor versus a whole session
- an inline diff to Keep or Undo
- multi-file work belongs elsewhere
- inlineChat.askInChat reroutes the shortcut
basics
~20 sUse editor inline chat for a quick, targeted edit in the open file: its prompt is scoped to the active editor or selection and comes back as an inline diff. Use the Chat view for multi-step, multi-file work and codebase questions.
solid answer
~50 sEditor inline chat (`Cmd+I` on macOS, `Ctrl+I` on Windows and Linux) opens inside the editor, scopes the prompt to the code in the active editor (or to a selection, if you make one) and shows the change as an inline diff that you **Keep** or **Undo**. It may still read other workspace files, but it is built for focused edits. The Chat view, in the Secondary Side Bar by default, holds a whole session with its own Session Target, Agent, model and Permissions controls. Multi-step tasks, multi-file changes and codebase exploration belong there. Two lighter surfaces complete the set: terminal inline chat suggests a shell command that you **Run** or **Insert**, and Quick Chat answers a short question and can hand it to the Chat view. One surprise: if the file already belongs to an active chat editing session, the inline chat shortcut opens **Ask in Chat** in the Chat view instead, unless `inlineChat.askInChat` is `false`.
go deeper
Recall the split: inline chat for a focused edit in the active editor, reviewed as an inline diff with Keep or Undo; the Chat view for conversations and multi-file work.
Explain the scoping: the active editor or selection for inline chat, a whole session with Session Target, Agent, model and Permissions in the Chat view, and where terminal inline chat and Quick Chat fit.
Show that you know the edge cases: inlineChat.askInChat sending the shortcut into an active editing session, inlineChat.defaultModel resetting on reload, and when to move an inline request to the Chat view.
Frame the surface choice as a cost decision: a scoped diff is cheap to review, while a session that reaches across files needs the review discipline your team applies to bigger changes.
## Four chat surfaces in one editor GitHub Copilot's chat in VS Code runs in several places that look alike but scope a prompt differently. Once you know which surface you are in, you know what the model is looking at and what it can change. | Surface | How you open it | What the prompt is scoped to | What comes back | |---|---|---|---| | **Chat view** | **Chat** menu > **Open Chat** | A whole session: the conversation so far, the implicit context and anything the agent gathers | Answers, multi-file edits, tool runs | | **Editor inline chat** | `Cmd+I` (macOS) / `Ctrl+I` (Windows, Linux) in an editor | The code in the active editor, or the selected block | An inline diff with **Keep** and **Undo** | | **Terminal inline chat** | The same shortcut in the integrated terminal, or the **Terminal Inline Chat** command | A shell question | A command you **Run** or **Insert** | | **Quick Chat** | **Quick Chat** in the **Chat** menu | A short, throwaway question | An answer you can move with **Open in Chat view** | ## Editor inline chat: the active editor is the scope Editor inline chat is for a quick, targeted change to code you can see. A typical use: 1. Open the file, and select the block you care about if the request concerns only part of it. 2. Press `Cmd+I` / `Ctrl+I`, or choose **Open Inline Chat** from the **Chat** menu. 3. Type the request, such as "make this iterative", and press Enter. 4. Read the inline diff and choose **Keep** or **Undo**. A few details matter: - **Scope.** VS Code's documentation says the prompt is scoped to the code in the active editor, and a selection narrows it to that code. It also says inline chat *might* use content from other workspace files as context. So "it cannot see anything else" is wrong, but inline chat is not the place to plan a change across several files. - **Built-in command.** `/doc` generates documentation comments and is listed as a command for editor inline chat. - **Model.** `inlineChat.defaultModel` sets the model. If you switch models during a session, the switch lasts for that session and reverts to the setting after VS Code reloads. - **Limits.** Find, which searches a conversation, is not available in inline chat or Quick Chat. ## The Chat view: a session with controls The Chat view opens in the Secondary Side Bar by default. You can also open it as an editor tab (**New Chat Editor**) or in a separate window (**New Chat Window**). Its main features: - **Session controls.** Before the first prompt you choose a **Session Target**, an **Agent**, a **Language model** and **Permissions**. Together they decide what the session can do. What the agent then does on its own is covered by the material on Copilot's agent. - **History.** The conversation carries forward, so a follow-up builds on earlier turns instead of starting from scratch. - **Reach.** VS Code's own guidance sends multi-step tasks, multi-file changes and broader codebase exploration to the Chat view rather than to inline chat. ## When the shortcut opens the Chat view There is one case where the inline chat shortcut does something else. If the file you are in belongs to an **active chat editing session**, pressing the shortcut opens **Ask in Chat** in the Chat view. Your prompt then goes into the existing session and can use its full conversation context, and the editor's context menu shows **Ask in Chat** in place of **Open Inline Chat**. The setting is `inlineChat.askInChat`, which defaults to `true`. Set it to `false` to always get regular inline chat. Files that belong to no chat session always open regular inline chat, whatever the setting says. ## Terminal inline chat and Quick Chat - **Terminal inline chat** runs in the integrated terminal and helps with shell commands, for example "list the top 5 largest files in the src dir". It proposes a command. **Run** executes it, and **Insert** places it at the prompt so you can edit it before running it. - **Quick Chat** is a light panel at the top of the editor window for a short question. It supports the same `#` and `@` mentions as the Chat view, and **Open in Chat view** carries the conversation into a full session. ## Choosing in practice 1. The change concerns one block or file in front of you, and you want to review it as a diff: use **editor inline chat**. 2. You need a shell command: use **terminal inline chat**. 3. You have a one-off question and do not want to leave what you are doing: use **Quick Chat**. 4. The work spans files, needs the codebase explored, or takes several steps: use the **Chat view**. When an inline edit turns out to need more than one file, it is usually better to move to the Chat view than to keep re-prompting inline chat.
- What changes when you select a block of code before opening editor inline chat?The selection narrows the prompt to that block instead of the whole active editor, so "make this iterative" applies to the selected function. The result still arrives as an inline diff with Keep and Undo, and inline chat may still read other workspace files for context.
- Which model does editor inline chat use, and how do you change it for good?It uses the model named in `inlineChat.defaultModel`. Picking a different model during an inline chat session lasts for the rest of that session, but after VS Code reloads it reverts to the setting. So a lasting change goes in `inlineChat.defaultModel`, not the picker.
- What does terminal inline chat give you that the Chat view does not?It answers a shell question right in the integrated terminal with a command, and offers **Run** to execute it or **Insert** to put it at the prompt for editing first. You get the command without leaving the terminal or opening a session.
- Inline chat sees only the selected lines and can never read another file.
- Editor inline chat is the right place for a change spanning several files.
- Inline chat writes its change straight to the file with no Keep or Undo step.
- The inline chat shortcut always opens inline chat, whatever session the file belongs to.
- Quick Chat cannot use # or @ mentions the way the Chat view can.