Add "Checkout Pull Request" command to chat session context menu#7669
Merged
Add "Checkout Pull Request" command to chat session context menu#7669
Conversation
Co-authored-by: rebornix <876920+rebornix@users.noreply.github.com>
- Add pr.checkoutChatSessionPullRequest command to package.json - Add localized title to package.nls.json - Implement checkoutChatSessionPullRequest function in src/commands.ts - Register command in src/commands.ts - Add command to chat/chatSessions context menu positioned above Close Pull Request - Reuse existing switchToPr functionality for checkout logic
Copilot
AI
changed the title
[WIP] add "Checkout Pull Request" to the context menu for the chat session item (it should be be above the Close Pull Request)
Add "Checkout Pull Request" command to chat session context menu
Aug 26, 2025
rebornix
approved these changes
Aug 26, 2025
Yoyokrazy
approved these changes
Aug 26, 2025
alexr00
reviewed
Aug 27, 2025
| "category": "%command.pull.request.category%" | ||
| }, | ||
| { | ||
| "command": "pr.checkoutChatSessionPullRequest", |
Member
There was a problem hiding this comment.
We should exclude this command from the command palette by adding an entry with when false in
vscode-pull-request-github/package.json
Lines 1909 to 1910 in faecc91
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.
This PR adds a "Checkout Pull Request" command to the context menu for chat session items in the GitHub Pull Requests extension. The new command is positioned above the existing "Close Pull Request" command as requested.
Changes
New Command Implementation
pr.checkoutChatSessionPullRequestTechnical Details
The implementation follows existing patterns in the codebase:
Command Declaration (
package.json):chat/chatSessionscontext menu with appropriate conditional logicCommand Function (
src/commands.ts):ChatSessionWithPRargumentswitchToPrfunction for consistent checkout behaviorMenu Integration:
chatSessionType == copilot-swe-agent) as other commandsUser Experience
Users can now:
This enhancement improves workflow efficiency by providing direct access to pull request checkout functionality from the chat sessions view.
Testing
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.