Chat
Chat surfaces, context, session configuration, and reviewing AI changes
title: "Chat" description: "Chat surfaces, context, session configuration, and reviewing AI changes" section: "Copilot" readTime: "6 min"
Copilot Chat
Chat enables natural language AI assistance for coding tasks. Four surfaces are available, each optimized for different workflows.
Chat Surfaces
| Surface | Shortcut | Best for |
|---|---|---|
| Chat view | Ctrl+Alt+I | Multi-turn conversations, agents, multi-file edits |
| Inline chat | Ctrl+I | In-place edits in editor or terminal |
| Quick Chat | Ctrl+Shift+Alt+L | Quick questions without leaving current view |
| Command line | code chat | Starting chat from outside VS Code |
Configure Your Session
When starting a chat session, four settings shape behavior:
- Session type — where the agent runs (local, background, cloud)
- Agent — role/persona (Agent, Plan, Ask, or custom)
- Permission level — how much autonomy (Default Approvals / Bypass / Autopilot)
- Language model — which AI model powers the conversation
Adding Context
| Method | What it provides |
|---|---|
| Implicit | Active file, current selection, file name (automatic) |
#file / #folder / #symbol | Explicit file/folder/symbol reference |
#codebase | Semantic search across entire workspace |
#fetch | Content from a web URL |
@vscode / @terminal / @github | Domain-specific participants |
| Vision | Attach images (screenshots, UI mockups) |
| Drag & drop | Drop files from Explorer or editor tabs onto Chat |
Semantic Search (All Workspaces)
Semantic indexing now works in every workspace — not just large or pre-configured ones. Agents find relevant code by meaning, even when you don't know the exact file name.
Agents can also run grep-style searches across GitHub repos and organizations using the built-in githubTextSearch tool — pull context from any repo you have access to, not just what's on disk.
Submit Your First Prompt
- Open Chat view (
Ctrl+Alt+I) - Select Local from the agent target dropdown
- Select Agent from the agent picker
- Type a prompt and press Enter:
Create a basic calculator app with HTML, CSS, and JavaScript
- Review suggested changes and Keep or Discard
Review and Manage Changes
After the AI edits files:
- Inline diffs in chat — code changes now appear as diffs directly in the chat thread; review without opening a file
- Checkpoints — VS Code auto-snapshots files; roll back to a previous state anytime
- Stage to accept — staging changes in Source Control automatically accepts pending AI edits
Query Chat History with /chronicle
/chronicle (Experimental) stores your chat interactions in a local database so you can search past sessions.
/chronicle what files did I change last Tuesday?
/chronicle find the session where I fixed the auth bug
/chronicle recent work on the payments module
Enable it in Settings: github.copilot.chat.localIndex.enabled
Chronicle also surfaces personalised workflow tips based on your history — files you touch most, PRs you reference, patterns that repeat.
Agents and the Browser
Give agents visibility into your live browser by sharing tabs on demand. Useful for UI work — the agent sees what the page actually renders, not just source code:
- Open your app in the integrated browser
- Share the tab with the agent
- The agent reads content, interacts with elements, and validates changes in real time
Agents and Open Terminals
Agents can read from and write to any open foreground terminal, including running REPLs, dev servers, and interactive scripts. You no longer need to stop a process before asking Copilot to act on its output.
Getting Better Responses
- Be specific: reference files, symbols, use
/commands - Add custom instructions for project-wide coding standards
- Use
/compactwhen the conversation grows too long - Start new sessions for unrelated tasks (context pollution degrades quality)
- Use the model picker (
Ctrl+Alt+.) to switch to a model better suited for the task
Troubleshooting Responses
Use Agent Logs (... menu → Show Agent Debug Logs) to inspect tool call sequences, LLM requests, token usage, and prompt file discovery. Logs now persist locally across sessions — retrace what happened in earlier runs without keeping VS Code open. Use the Chat Debug view for raw system prompt and tool payloads.
Long-running background terminal commands surface as system notifications in chat so you always know when something finishes.