-
Notifications
You must be signed in to change notification settings - Fork 29
Update PET command to include submenu for find and resolve operations #702
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
Merged
Conversation
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
Co-authored-by: eleanorjboyd <26030610+eleanorjboyd@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update PET command
Update PET command to include submenu for find and resolve operations
Aug 11, 2025
Copilot finished work on behalf of
eleanorjboyd
August 11, 2025 00:40
Tyriar
requested changes
Aug 11, 2025
Tyriar
approved these changes
Aug 11, 2025
eleanorjboyd
approved these changes
Aug 11, 2025
eleanorjboyd
added a commit
to eleanorjboyd/vscode-python-environments
that referenced
this pull request
Aug 12, 2025
…microsoft#702) This PR updates the "Python: Run Python Environment Tool (PET) in Terminal" command to provide a better user experience by adding a submenu that allows users to choose between different PET operations. ## Changes ### Before The command would directly run the PET executable without any options, requiring users to manually add arguments in the terminal. ### After The command now presents a QuickPick menu with two options: 1. **Find All Environments** - Runs `pet find --verbose` to discover and list all Python environments 2. **Resolve Environment...** - Prompts for a Python executable path, then runs `pet resolve <path>` to get detailed environment information ## User Experience Flow 1. User runs "Python: Run Python Environment Tool (PET) in Terminal..." 2. A menu appears with clear descriptions of each operation: - "Find All Environments": Finds all environments and reports them to standard output - "Resolve Environment...": Resolves & reports details of a specific environment 3. For "Find All Environments": Terminal opens and immediately runs the find command 4. For "Resolve Environment...": User enters a path to a Python executable, then the resolve command runs 5. All interactions support cancellation and include proper error handling ## Technical Details - Updated command title to include ellipsis ("...") to indicate additional user interaction - Implemented using VS Code's native QuickPick and InputBox APIs - Added input validation for the resolve path option - Maintained existing terminal creation and error handling patterns - All existing functionality preserved with no breaking changes The implementation follows the existing codebase patterns and includes comprehensive error handling for a smooth user experience. Fixes microsoft#701. <!-- START COPILOT CODING AGENT TIPS --> --- ✨ Let Copilot coding agent [set things up for you](https://github.com/microsoft/vscode-python-environments/issues/new?title=✨Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot) — coding agent works faster and does higher quality work when set up for your repo. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: eleanorjboyd <26030610+eleanorjboyd@users.noreply.github.com>
NguyenCuong1989
referenced
this pull request
in NguyenCuong1989/vscode-python-environments
Oct 23, 2025
… (#702)
This PR updates the "Python: Run Python Environment Tool (PET) in
Terminal" command to provide a better user experience by adding a
submenu that allows users to choose between different PET operations.
## Changes
### Before
The command would directly run the PET executable without any options,
requiring users to manually add arguments in the terminal.
### After
The command now presents a QuickPick menu with two options:
1. **Find All Environments** - Runs `pet find --verbose` to discover and
list all Python environments
2. **Resolve Environment...** - Prompts for a Python executable path,
then runs `pet resolve <path>` to get detailed environment information
## User Experience Flow
1. User runs "Python: Run Python Environment Tool (PET) in Terminal..."
2. A menu appears with clear descriptions of each operation:
- "Find All Environments": Finds all environments and reports them to
standard output
- "Resolve Environment...": Resolves & reports details of a specific
environment
3. For "Find All Environments": Terminal opens and immediately runs the
find command
4. For "Resolve Environment...": User enters a path to a Python
executable, then the resolve command runs
5. All interactions support cancellation and include proper error
handling
## Technical Details
- Updated command title to include ellipsis ("...") to indicate
additional user interaction
- Implemented using VS Code's native QuickPick and InputBox APIs
- Added input validation for the resolve path option
- Maintained existing terminal creation and error handling patterns
- All existing functionality preserved with no breaking changes
The implementation follows the existing codebase patterns and includes
comprehensive error handling for a smooth user experience.
Fixes #701.
<!-- START COPILOT CODING AGENT TIPS -->
---
✨ Let Copilot coding agent [set things up for
you](https://github.com/microsoft/vscode-python-environments/issues/new?title=✨Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot)
— coding agent works faster and does higher quality work when set up for
your repo.
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: eleanorjboyd <26030610+eleanorjboyd@users.noreply.github.com>
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 updates the "Python: Run Python Environment Tool (PET) in Terminal" command to provide a better user experience by adding a submenu that allows users to choose between different PET operations.
Changes
Before
The command would directly run the PET executable without any options, requiring users to manually add arguments in the terminal.
After
The command now presents a QuickPick menu with two options:
pet find --verboseto discover and list all Python environmentspet resolve <path>to get detailed environment informationUser Experience Flow
Technical Details
The implementation follows the existing codebase patterns and includes comprehensive error handling for a smooth user experience.
Fixes #701.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.