Adopt latest provider pattern for org/enterprise custom agents#2737
Merged
Adopt latest provider pattern for org/enterprise custom agents#2737
Conversation
…com/microsoft/vscode-copilot-chat into pawang/customAgentProviderFollowups
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…der.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…com/microsoft/vscode-copilot-chat into pawang/customAgentProviderFollowups
…pawang/customAgentProviderFollowups
…pawang/customAgentProviderFollowups
6 tasks
…pawang/updateCustomAgents
Contributor
There was a problem hiding this comment.
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
CustomAgentsProviderinterface with newCustomAgentProvider,InstructionsProvider, andPromptFileProviderinterfaces - Updated API registration from
registerCustomAgentsProvidertoregisterCustomAgentProvider - Changed return types from interface-based
CustomAgentResourceobjects to class-basedCustomAgentChatResourceinstances - Made
isExternalInstructionsFilemethod 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 |
src/platform/customInstructions/common/customInstructionsService.ts
Outdated
Show resolved
Hide resolved
…ce.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
bhavyaus
approved these changes
Jan 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See microsoft/vscode#280426