Restore PR extension management with API-first approach #1639
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.
Restores logic from commit 1cafcac that was removed, polishing it to align with the GitHub API-first pattern established in commit 361cb48.
Changes
Restored extension management infrastructure:
isPullRequestExtensionInstalled()- checks extension availabilityinstallPullRequestExtension()- auto-installs extension with prerelease detection for Insiders buildsprExtensionInstalledContextKeyCommand routing strategy:
checkoutFromDescriptionandapplyChangesFromDescription- proxy commands that install PR extension on-demand (requires extension functionality)closeChatSessionPullRequest- uses GitHub API directly (no extension required)UI Integration:
chat/chatSessionsfor checkout and apply changes commands!github.copilot.prExtensionInstalledto conditionally show menu itemsImprovements:
Example
User Experience
When viewing copilot-cloud-agent chat sessions without the GitHub Pull Request extension installed, users will see:
These buttons automatically disappear once the PR extension is installed, providing a seamless onboarding experience.
Created from VS Code via the GitHub Pull Request extension.
Original prompt
Created from VS Code via the GitHub Pull Request extension.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.