NEW: Claude Code Security — research preview

Chat

Chat surfaces, context, session configuration, and reviewing AI changes

Read time: 5 min

title: "Chat" description: "Chat surfaces, context, session configuration, and reviewing AI changes" section: "Copilot" readTime: "5 min"

Copilot Chat

Chat enables natural language AI assistance for coding tasks. Four surfaces are available, each optimized for different workflows.

Chat Surfaces

SurfaceShortcutBest for
Chat viewCtrl+Alt+IMulti-turn conversations, agents, multi-file edits
Inline chatCtrl+IIn-place edits in editor or terminal
Quick ChatCtrl+Shift+Alt+LQuick questions without leaving current view
Command linecode chatStarting chat from outside VS Code

Configure Your Session

When starting a chat session, four settings shape behavior:

  1. Session type — where the agent runs (local, background, cloud)
  2. Agent — role/persona (Agent, Plan, Ask, or custom)
  3. Permission level — how much autonomy (Default Approvals / Bypass / Autopilot)
  4. Language model — which AI model powers the conversation

Adding Context

MethodWhat it provides
ImplicitActive file, current selection, file name (automatic)
#file / #folder / #symbolExplicit file/folder/symbol reference
#codebaseSemantic search across entire workspace
#fetchContent from a web URL
@vscode / @terminal / @githubDomain-specific participants
VisionAttach images (screenshots, UI mockups)
Drag & dropDrop files from Explorer or editor tabs onto Chat

Submit Your First Prompt

  1. Open Chat view (Ctrl+Alt+I)
  2. Select Local from the agent target dropdown
  3. Select Agent from the agent picker
  4. Type a prompt and press Enter:
Create a basic calculator app with HTML, CSS, and JavaScript
  1. Review suggested changes and Keep or Discard

Review and Manage Changes

After the AI edits files:

  • Inline diffs — open a changed file to see diffs; use overlay controls to keep/undo individual changes
  • 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

Getting Better Responses

  • Be specific: reference files, symbols, use / commands
  • Add custom instructions for project-wide coding standards
  • Use /compact when 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. Use the Chat Debug view for raw system prompt and tool payloads.