Skip to content
Core feature · 02Verified 2 Nov 2026

Copilot Chat & inline chat

Ask questions, plan work and make edits in natural language. The quality of an answer depends on the context you give it — #-mentions, slash commands and attachments are how you control that context.

Four ways to chat

Use the surface that matches the size of the task.

Chat view

Secondary side bar

mac ⌃+⌘+Iwin/linux Ctrl+Alt+I

Longer conversations, planning, and agent sessions that touch many files.

Editor inline chat

In the editor at your cursor

mac ⌘+Iwin/linux Ctrl+I

Focused edits to a selection — refactor, rename, add error handling.

Terminal inline chat

Integrated terminal

mac ⌘+Iwin/linux Ctrl+I

Generate or explain a shell command without leaving the terminal.

Quick Chat

Floating command-palette style

mac ⇧+⌥+⌘+Lwin/linux Ctrl+Shift+Alt+L

A fast question without opening a panel.

api — Copilot Chat (Agent)
routes.tsredis.ts
1import { Router } from "express";
2import { rateLimit } from "../middleware/rate-limit";
3
4export const v1 = Router();
5v1.use("/orders", rateLimit, ordersRouter);
6v1.use("/users", rateLimit, usersRouter);
7// Limits: 100 req/min per API key
mainTypeScript
CHATSession · Add rate limiting

Add rate limiting to the public API. 100 req/min per key, return 429 with Retry-After. #codebase #routes.ts

✓ Searched codebase for “express middleware”

✓ Read src/api/routes.ts, src/lib/redis.ts

I added rateLimit() middleware backed by Redis and applied it to all /v1 routes. 3 files changed.

KeepUndo

Ask, plan, or build — type # for context, / for commands

Agent Auto

Context variables (#-mentions)

Type # in the chat input to attach context. Explicit context beats hoping Copilot finds the right file.

MentionWhat it attachesExample prompt
#<file> / #<folder>Attach a specific file or folder. Drag-and-drop from Explorer works too.Where is auth validated in #auth.ts?
#<symbol>Attach a function, class or other symbol (the containing file must be open). GitHub's cheat sheet lists the short form #sym.Explain #parseInvoice
#selectionThe text currently selected in the active editor.Add JSDoc to #selection
#codebaseRequests a semantic search across the workspace. It does not paste the entire codebase into context.How do we paginate API results? #codebase
#fetchRetrieves a web page as context (VS Code asks before visiting new URLs).Summarise the breaking changes #fetch https://…
#fileCurrent file's content (listed in GitHub's VS Code chat-variable reference).Write tests for #file
Issue / PR contextPaste a GitHub issue or PR URL, or use Add Context → Issue… / Pull Request…Implement https://github.com/org/repo/issues/42
Images (vision)Attach a screenshot or sketch; the model analyses it (input only).Build this layout [screenshot.png]

Slash commands

Type / for shortcuts to common tasks. Availability differs by IDE — the 'where' column is taken from GitHub's chat cheat sheet and the VS Code reference.

/explain

Explain how the selected or active code works.

VS CodeVisual StudioJetBrainsXcode
/fix

Propose a fix for problems in the selected code.

VS CodeVisual StudioJetBrainsXcode
/tests

Generate unit tests for the selected code.

VS CodeVisual StudioJetBrainsXcode
/doc

Generate documentation comments (the command is /doc, not /docs).

VS Code (inline chat)Visual StudioXcode
/new

Scaffold a new workspace, project or file.

VS Code
/newNotebook

Scaffold a Jupyter notebook.

VS Code
/plan

Research and propose an implementation plan before coding.

VS Code
/fixTestFailure

Find and fix a failing test.

VS Code
/setupTests

Choose and set up a test framework.

experimentalVS Code
/optimize

Analyse and improve running time of the selection.

Visual Studio
/simplify

Simplify the current code selection.

Xcode
/compact

Compress conversation context in long sessions.

VS CodeCopilot CLI
/fork

Fork the conversation with its history.

VS Code
/init

Generate or update workspace instructions.

VS Code (Local)Copilot CLI
/clear

Start a fresh chat session.

VS CodeGitHub.com
/help

Quick reference for Copilot in this surface.

VS CodeVisual StudioJetBrains
/models · /tools

Open the model picker or configure tools.

VS Code
/<prompt-or-skill>

Run a prompt file or agent skill by name, e.g. /webapp-testing.

VS CodeVisual StudioCopilot CLI
/generate

Not a built-in command in current docs. Write the request in plain language, or make your own /generate prompt file.

note—

/doc, not /docs

The built-in documentation command is /doc. There is no built-in /generate — just describe what you want, or add the generate.prompt.md template from the ecosystem library to create your own /generate.

Inline chat

Press ⌘I / Ctrl+I in the editor to edit in place. The diff is previewed inline; accept or discard it.

users.js — inline chat
users.js
1 import db from "./db.js";
Convert to async/await and add error handling
Accept ⌘↵Discard1 change
2−function getUser(id, cb) { db.find(id).then(u => cb(null, u)); }
2+export async function getUser(id) {
3+ try { return await db.find(id); }
4+ catch (err) { throw new Error(`getUser($${id}) failed`, { cause: err }); }
5+}
6 // …
mainTypeScript

Chat participants (@workspace, @terminal, @vscode)

Participants were the original way to route a question to a domain expert. In VS Code they are deprecated and not supported in the default Copilot agent harness.

ParticipantWhat it didWhat to do now
@workspaceAnswered questions about the open workspace.Ask directly in Agent/Ask; add #codebase or specific files for grounding.
@terminalShell and terminal-output help.Use terminal inline chat (⌘I / Ctrl+I) or attach terminal output.
@vscodeVS Code settings and command questions.Ask directly — the Copilot harness can search settings and docs.
@githubGitHub skills (issues, PRs, search).Use the GitHub MCP server or paste issue/PR URLs as context.
@azureAzure services help (preview).Use the Azure MCP server / extension tools.

Still in other IDEs

Some IDEs (for example Visual Studio and JetBrains) still list participants such as @workspace or @github. Check your IDE's chat cheat sheet before relying on them.