-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Cloud Agent: check /enabled #3241
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
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 implements the /agents/swe/jobs/{owner}/{repo}/enabled endpoint check to provide better user experience when the Copilot cloud agent (CCA) is disabled for a repository. It adds early validation with friendlier error messages and prevents unnecessary API calls to other endpoints when access is denied.
Changes:
- Adds
isCCAEnabledmethod to check CCA availability before operations - Implements caching of CCA enabled status per repository
- Provides user-friendly error messages for different failure scenarios (401/403/422)
- Early returns in
provideChatSessionProviderOptionsto avoid fetching models/agents when CCA is disabled
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/platform/github/common/githubService.ts | Adds CCAEnabledResult interface and isCCAEnabled method signature to IOctoKitService |
| src/platform/github/common/octoKitServiceImpl.ts | Implements isCCAEnabled method that calls the new endpoint and handles status codes |
| src/extension/chatSessions/vscode-node/copilotCloudSessionsProvider.ts | Integrates CCA enabled check with caching, provides friendly error messages, and implements early exit when disabled |
| src/extension/agents/vscode-node/test/mockOctoKitService.ts | Updates mock to include isCCAEnabled method returning enabled by default |
| package.json | Updates @vscode/copilot-api from 0.2.9 to 0.2.12 to support new RequestType.CopilotAgentJobEnabled |
| package-lock.json | Reflects the dependency version update |
Co-authored-by: Copilot <[email protected]>
fixes microsoft/vscode#279098
ctx https://vscodeteam.slack.com/archives/C04PKH0BDQS/p1769541405028749
Implements
/agents/swe/jobs/{owner}/{repo}/enabled/models) if 401/403/422 returned