-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Add support for GH Custom Agents #2118
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
… into pawang/ghCustomAgents
… into pawang/ghCustomAgents
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 pull request adds support for GitHub Custom Agents from GitHub Enterprise and Organizations. It introduces infrastructure to fetch, cache, and provide custom agent resources (.agent.md files) from organization and enterprise-level GitHub repositories, making them available as chat participants in VS Code. The implementation includes a new provider that integrates with the VS Code proposed API for custom agents, a new GitHub API endpoint for fetching agent details, and a configuration setting to enable/disable this feature.
Key changes:
- New
getCustomAgentDetailsAPI method to fetch full agent configurations including prompts OrganizationAndEnterpriseAgentProviderthat implements caching and provides agents to VS Code- Configuration setting
chat.customAgents.showOrganizationAndEnterpriseAgentsto control feature availability
Reviewed changes
Copilot reviewed 8 out of 10 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/platform/github/common/githubService.ts | Adds interface definitions for custom agent details and list options, plus method signature for fetching agent details |
| src/platform/github/common/octoKitServiceImpl.ts | Implements getCustomAgentDetails method to fetch full agent configuration from GitHub API |
| src/platform/configuration/common/configurationService.ts | Adds configuration key for enabling organization/enterprise agents |
| src/extension/vscode.proposed.chatParticipantPrivate.d.ts | Adds VS Code API type definitions for CustomAgentsProvider, CustomAgentResource, and related interfaces |
| src/extension/extension/vscode-node/contributions.ts | Registers the new OrganizationAndEnterpriseAgentContribution |
| src/extension/agents/vscode-node/organizationAndEnterpriseAgentProvider.ts | Core provider implementation that fetches agents from GitHub, caches them locally, and provides them to VS Code |
| src/extension/agents/vscode-node/organizationAndEnterpriseAgentContrib.ts | Contribution class that conditionally registers the provider based on configuration |
| package.nls.json | Adds localization string for the new configuration setting |
| package.json | Adds configuration schema and updates @vscode/copilot-api dependency to 0.2.5 |
| package-lock.json | Updates lock file for new @vscode/copilot-api version |
Comments suppressed due to low confidence (1)
src/platform/github/common/githubService.ts:152
- The
CustomAgentListOptionsinterface is defined twice (lines 140-145 and 147-152) with identical content. Remove the duplicate definition.
export interface CustomAgentListOptions {
target?: 'github-copilot' | 'vscode';
excludeInvalidConfig?: boolean;
dedupe?: boolean;
includeSources?: ('repo' | 'org' | 'enterprise')[];
}
Related: microsoft/vscode#278251