Files
vscode/extensions/copilot
0201d5fdd3 sessions: implement chatSessionCustomizationProvider for Claude and Copilot CLI (#4772)
* Add customization providers for Claude and Copilot CLI chat sessions

* Add unit tests for chat session customization providers

Add tests for ClaudeCustomizationProvider and CopilotCLICustomizationProvider
covering metadata, item discovery, and change event forwarding. Refactor
metadata from static readonly to static getter for testability (avoids
class initializer accessing vscode.ChatSessionCustomizationType before
shim setup).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Fix customization provider accuracy: add hook discovery, mark unsupported types

- Claude provider now discovers hooks from .claude/settings.json and
  .claude/settings.local.json (workspace + user home), reporting them
  as ChatSessionCustomizationType.Hook items with event/matcher names
- Copilot CLI provider marks both Hook and Prompt as unsupported since
  it doesn't support hooks and prompt files aren't enumerable via the API
- Claude provider now takes IWorkspaceService, IFileSystemService, and
  INativeEnvService to read settings files for hook discovery
- Added 6 new hook discovery tests covering workspace/user settings,
  multiple matchers, invalid JSON, and missing files

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Mark Agent as unsupported for Claude customization provider

Claude doesn't use .agent.md files — it has its own agent system via
CLAUDE.md memory files and the Claude Agent SDK. Remove Agent items
from Claude's provideChatSessionCustomizations output and add Agent
to its unsupportedTypes metadata.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Remove workspaceSubpaths from API, add internal path filtering

Remove the workspaceSubpaths property from ChatSessionCustomizationProviderMetadata
since the extension should filter internally. Each provider now only returns items
under its relevant paths:

- Claude: instructions/skills under .claude/ (workspace folders + user home)
- Copilot CLI: instructions/skills under .github/ or .copilot/ (agents are always
  included since they're Copilot-specific)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Add TODO comments for work in progress on chatSessionCustomizationProvider API

* Sync chatSessionCustomizationProvider d.ts with VS Code origin/main

Add groupKey, badge, and badgeTooltip fields to ChatSessionCustomizationItem
to match upstream changes from #305810 and #305813.

The providers don't set these fields explicitly — the VS Code UI
auto-enriches instruction items by parsing frontmatter when groupKey
is not provided.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* sessions: Claude customization provider uses SDK runtime data

- Add IClaudeRuntimeDataService to cache agents from Query.supportedAgents()
- ClaudeCodeSession calls runtimeDataService.update() after query creation
- Rewrite ClaudeCustomizationProvider:
  - Agents: reported from SDK via IClaudeRuntimeDataService (built-in groupKey)
  - Instructions: hard-coded CLAUDE.md paths with existence checks
  - Skills: filtered from IChatPromptFileService under .claude/
  - Hooks: unchanged (from .claude/settings.json)
- unsupportedTypes changed from [Agent, Prompt] to [Prompt] only
- 28 tests (22 provider + 6 service)

* sessions: Copilot CLI customization provider uses runtime agent data

- Inject ICopilotCLIAgents to enrich agents with displayName/description
- Expand path filter: add .agents/ to CLI_SUBPATHS
- Add home directory support: ~/.copilot/, ~/.agents/
- Listen to ICopilotCLIAgents.onDidChangeAgents for change events
- 21 tests covering new paths, agent enrichment, and events

* fix: register IClaudeRuntimeDataService in test services

The existing claudeCodeAgent tests were failing because ClaudeCodeSession
now depends on IClaudeRuntimeDataService, but it was not registered in
createExtensionUnitTestingServices().

* sessions: implement correct chatSessionCustomizationProvider for Claude and Copilot CLI

Claude provider:
- New IClaudeRuntimeDataService to cache SDK Query agents
- Hybrid agent approach: file-based .claude/ agents pre-session, SDK agents post-session
- Instructions from hard-coded CLAUDE.md paths (stat-checked)
- Skills from .claude/skills/ via IChatPromptFileService
- Hooks from .claude/settings.json (unchanged)
- Per-category debug logging with names

Copilot CLI provider:
- ICopilotCLIAgents as primary agent source (SDK + prompt files)
- Path filter expanded to .github/, .copilot/, .agents/
- Home directory support (~/.copilot/, ~/.agents/)
- Agent enrichment with displayName/description from SDK

Menu contributions:
- chat/customizations/create for Claude agents, hooks, instructions sections

Code review fixes:
- Use stat() instead of readFile() for existence checks
- Fire-and-forget runtimeDataService.update() to avoid blocking session startup
- Restore vscode.ChatSessionCustomizationType in test afterEach
- Type-safe makeSweAgent helper (no as any)

* claude: mark plugins as unsupported type

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-31 23:58:02 +00:00
..
2026-03-19 08:41:33 +00:00
2026-03-26 15:54:34 +00:00

GitHub Copilot - Your autonomous AI peer programmer

GitHub Copilot is an AI peer programming tool that transforms how you write code in Visual Studio Code.

GitHub Copilot agents handle complete coding tasks end-to-end, autonomously planning work, editing files, running commands, and self-correcting when they hit errors. You can also leverage inline suggestions for quick coding assistance and inline chat for precise, focused edits directly in the editor.

Sign up for GitHub Copilot Free!

Working with GitHub Copilot agent mode to make edits to code in your workspace

Getting access to GitHub Copilot

Sign up for GitHub Copilot Free, or request access from your enterprise admin.

To access GitHub Copilot, an active GitHub Copilot subscription is required. You can read more about our business and individual offerings at github.com/features/copilot.

Build with autonomous agents

Let AI agents implement complex features end-to-end. Give an agent a high-level task and it breaks the work into steps, edits multiple files, runs terminal commands, and self-corrects when it hits errors or failing tests. Agents excel at building new features, debugging and fixing failing tests, refactoring codebases, and collaborating via pull requests.

Manage sessions from a central view. Run multiple agent sessions in parallel and track them in one place. Monitor session status, switch between active work, review file changes, and resume where you left off.

Run agents with your preferred harness. Use agents locally in VS Code, in the background via Copilot CLI, or Cloud via Copilot Coding Agent. You can also work with providers like Claude and Codex, and hand tasks off between agent types with context preserved all within the VS Code.

Video showing an agent session building a complete feature in VS Code.

Use agents to plan before you build with the Plan agent, which breaks tasks into structured implementation plans and asks clarifying questions. When your plan is ready, hand it off to an implementation agent to execute it. You can also delegate tasks to cloud agents that create branches, implement changes, and open pull requests for your team to review.

More ways to code with AI

Receive intelligent inline suggestions as you type with ghost text suggestions and next edit suggestions, helping you write code faster. Copilot predicts your next logical change, and you can accept suggestions with the Tab key.

Video showing Copilot next edit suggestions.

Use inline chat for targeted edits by pressing Ctrl+I/Cmd+I to open a chat prompt directly in the editor. Describe a change and Copilot suggests edits in place for refactoring methods, adding error handling, or explaining complex algorithms without leaving your editor.

Inline chat in VS Code

Customize AI for your workflow

Agents work best when they understand your project's conventions and have the right tools. Tailor Copilot so it generates code that fits your codebase from the start.

Project context. Use custom instructions to specify project-wide or task-specific context and coding guidelines.

Add specialized capabilities. Teach Copilot specialized capabilities with agent skills or define specialized personas with custom agents.

Connect to external tools and services. Extend agents further with tools from MCP servers and extensions to give Copilot a gateway to external data sources, APIs, or specialized tools.

Supported languages and frameworks

GitHub Copilot works on any language, including Java, PHP, Python, JavaScript, Ruby, Go, C#, or C++. Because its been trained on languages in public repositories, it works for most popular languages, libraries and frameworks.

Version compatibility

As Copilot Chat releases in lockstep with VS Code due to its deep UI integration, every new version of Copilot Chat is only compatible with the latest and newest release of VS Code. This means that if you are using an older version of VS Code, you will not be able to use the latest Copilot Chat.

Only the latest Copilot Chat versions will use the latest models provided by the Copilot service, as even minor model upgrades require prompt changes and fixes in the extension.

Privacy and preview terms

By using Copilot Chat you agree to GitHub Copilot chat preview terms. Review the transparency note to understand about usage, limitations and ways to improve Copilot Chat during the technical preview.

Please refer to our Privacy Statement to learn about the data we collect, how we use it, and the controls available to you.

To get the latest security fixes, please use the latest version of the Copilot extension and VS Code.

Resources & next steps

Data and telemetry

The GitHub Copilot Extension for Visual Studio Code collects usage data and sends it to Microsoft to help improve our products and services. Read our privacy statement to learn more. This extension respects the telemetry.telemetryLevel setting which you can learn more about at https://code.visualstudio.com/docs/supporting/faq#_how-to-disable-telemetry-reporting.

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.

License

Copyright (c) Microsoft Corporation. All rights reserved.

Licensed under the MIT license.