| ContentId | e6b33fcb-8240-49dd-b6ca-5412d6fa669a |
|---|---|
| DateApproved | 4/8/2026 |
| MetaDescription | Use Inline Chat in Visual Studio Code to make edits directly in the editor or get command suggestions in the terminal. |
| MetaSocialImage | ../images/shared/github-copilot-social.png |
With inline chat in Visual Studio Code, you can ask for generating code or making edits directly in the editor or get help with shell commands within the integrated terminal. Inline chat allows you to stay in the flow of your work without having to switch to a separate Chat view.
Use inline chat when you want to make quick, targeted edits within the visible code context. For multi-step tasks, multi-file changes, or broader codebase exploration, use the Chat view instead.
When you use editor inline chat, your prompt is scoped to the code in the active editor. Inline chat might use the content from other files in your workspace as context for your prompt.
To use editor inline chat:
-
Open a file in the editor.
-
Open editor inline chat by using the
kb(inlinechat.start)keyboard shortcut or by selecting Open Inline Chat from the Chat menu in the title bar. -
Type your prompt in the chat input field and press
kbstyle(Enter).[!TIP] Select a block of code in the editor to scope the prompt to that code.
-
VS Code shows a diff with the code suggestion inline in the editor. Use Keep or Undo to accept or reject the changes.
When a file belongs to an active chat editing session, pressing kb(inlinechat.start) opens "Ask in Chat" in the Chat view instead of regular inline chat. This routes your prompt into the existing session so it can use the full conversation context. The editor context menu also shows Ask in Chat instead of Open Inline Chat for these files.
To always use regular inline chat, even for files that belong to a chat session, set setting(inlineChat.askInChat) to false.
On files that don't belong to any chat session, kb(inlinechat.start) always opens regular inline chat, regardless of this setting.
When you select text in the editor, VS Code can display a visual hint to help you start inline chat for the selected code. Use the setting(inlineChat.affordance) setting to control how this hint appears:
off: no hint is shown when you select textgutter: the hint appears in the line number area next to your selectioneditor: the hint appears at the cursor position within your selection, integrated with the lightbulb for code actions
The hint displays an inline chat input box and actions for adding the selection to chat, explaining the code, and starting a code review of the selection.
Note
This feature is experimental and works with the setting(inlineChat.renderMode) setting set to hover.
You can bring up terminal inline chat in the integrated terminal to get help with shell commands or ask terminal-related questions.
To use terminal inline chat:
-
Open the terminal in VS Code by selecting the View > Terminal menu item or using the
kb(workbench.action.terminal.toggleTerminal)keyboard shortcut. -
Start terminal inline chat by using the
kb(workbench.action.terminal.chat.start)keyboard shortcut or running the Terminal Inline Chat command in the Command Palette. -
Type your prompt in the chat input field and press
kbstyle(Enter). -
Review the response and select the Run (
kb(workbench.action.terminal.chat.runCommand)) to run the command in the terminalAlternatively, select Insert (
kb(workbench.action.terminal.chat.insertCommand)) to insert the command into the terminal and modify it before running.
You can change the language model that is used for editor inline chat. To configure the default model for inline chat, use the setting(inlineChat.defaultModel) setting. The setting lists all available models from the model picker.
If you change the model during an inline chat session, the selection persists for the remainder of the session. After you reload VS Code, the model resets to the value specified in the setting(inlineChat.defaultModel) setting.
Learn more about choosing the right model for your task.
Quick Chat provides a lightweight chat panel that opens at the top of the editor. Use it for quick questions and short interactions without opening the full Chat view or leaving your current workflow.
To open Quick Chat, press kb(workbench.action.quickchat.toggle) or select Quick Chat from the Chat menu in the title bar.
Type your prompt and press kbstyle(Enter) to get a response. Quick Chat supports the same #-mentions and @-mentions as the Chat view for adding context. Select the Open in Chat View button to continue the conversation in the full Chat view.



