Skip to content

Conversation

@pwang347
Copy link
Member

@pwang347 pwang347 commented Jan 7, 2026

@pwang347 pwang347 marked this pull request as ready for review January 15, 2026 23:46
Copilot AI review requested due to automatic review settings January 15, 2026 23:46
@vs-code-engineering vs-code-engineering bot added this to the January 2026 milestone Jan 15, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adopts the latest provider pattern for org/enterprise custom agents, migrating from the old CustomAgentsProvider API to the new provider-based approach introduced in VS Code core (see microsoft/vscode#280426).

Changes:

  • Replaced CustomAgentsProvider interface with new CustomAgentProvider, InstructionsProvider, and PromptFileProvider interfaces
  • Updated API registration from registerCustomAgentsProvider to registerCustomAgentProvider
  • Changed return types from interface-based CustomAgentResource objects to class-based CustomAgentChatResource instances
  • Made isExternalInstructionsFile method async to support checking extension-contributed prompt files

Reviewed changes

Copilot reviewed 11 out of 13 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/vscodeTypes.ts Added export for new CustomAgentChatResource type
src/util/common/test/shims/vscodeTypesShim.ts Added CustomAgentChatResource to the VS Code types shim
src/util/common/test/shims/chatTypes.ts Implemented CustomAgentChatResource class for testing
src/platform/test/common/testCustomInstructionsService.ts Updated mock to return Promise from isExternalInstructionsFile
src/platform/customInstructions/common/customInstructionsService.ts Made isExternalInstructionsFile async and added logic to check extension-contributed prompt files via command
src/extension/vscode.proposed.chatPromptFiles.d.ts Added new proposed API definitions for chat resource classes and providers
src/extension/vscode.proposed.chatParticipantPrivate.d.ts Removed old CustomAgentResource and CustomAgentsProvider definitions
src/extension/tools/node/toolUtils.ts Added await for now-async isExternalInstructionsFile call
src/extension/extension/vscode-node/contributions.ts Renamed contribution class from OrganizationAndEnterpriseAgentContribution to PromptFileContribution
src/extension/agents/vscode-node/test/organizationAndEnterpriseAgentProvider.spec.ts Updated tests to work with new resource class pattern and fixed timing issues with background fetch
src/extension/agents/vscode-node/promptFileContrib.ts Renamed class and updated to use new registerCustomAgentProvider API
src/extension/agents/vscode-node/organizationAndEnterpriseAgentProvider.ts Updated provider to implement new interface and return CustomAgentChatResource instances
package.json Updated activation event and enabled chatPromptFiles proposed API

@pwang347 pwang347 enabled auto-merge January 16, 2026 00:46
@pwang347 pwang347 added this pull request to the merge queue Jan 16, 2026
Merged via the queue into main with commit 73a6bb7 Jan 16, 2026
19 checks passed
@pwang347 pwang347 deleted the pawang/updateCustomAgents branch January 16, 2026 03:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants