-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Adopt latest provider pattern for org/enterprise custom agents #2737
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…com/microsoft/vscode-copilot-chat into pawang/customAgentProviderFollowups
Co-authored-by: Copilot <[email protected]>
…der.ts Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
…com/microsoft/vscode-copilot-chat into pawang/customAgentProviderFollowups
…pawang/customAgentProviderFollowups
…pawang/customAgentProviderFollowups
…pawang/updateCustomAgents
There was a problem hiding this 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
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 <[email protected]>
See microsoft/vscode#280426