Inline chat
With Copilot inline chat in Visual Studio Code, you can ask questions and get suggestions 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.
Prerequisites
- Install the latest version of Visual Studio Code
- Access to Copilot
Use editor inline chat
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 ⌘I (Windows, Linux Ctrl+I) 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 Enter.
TipSelect 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. Accept or reject the changes.

-
Optionally, ask a follow-up question to get other suggestions or refine the results.
Attach context to your inline chat prompt to include relevant files, code symbols, or other context. Learn more about adding context to your chat prompt.
Use terminal inline chat
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 ⌃` (Windows, Linux Ctrl+`) keyboard shortcut.
-
Start terminal inline chat by using the ⌘I (Windows, Linux Ctrl+I) keyboard shortcut or running the Terminal Inline Chat command in the Command Palette.
-
Type your prompt in the chat input field and press Enter.

-
Review the response and select the Run (⌘Enter (Windows, Linux Ctrl+Enter)) to run the command in the terminal
Alternatively, select Insert (⌥Enter (Windows, Linux Alt+Enter)) to insert the command into the terminal and modify it before running.