Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Aug 11, 2025

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.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

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
Copilot AI requested a review from eleanorjboyd August 11, 2025 00:40
@eleanorjboyd eleanorjboyd removed their request for review August 11, 2025 17:25
@eleanorjboyd eleanorjboyd marked this pull request as ready for review August 11, 2025 17:25
@vs-code-engineering vs-code-engineering bot added this to the August 2025 milestone Aug 11, 2025
@eleanorjboyd eleanorjboyd requested a review from Tyriar August 11, 2025 17:36
@eleanorjboyd eleanorjboyd enabled auto-merge (squash) August 11, 2025 18:09
@eleanorjboyd eleanorjboyd merged commit cae81b4 into main Aug 11, 2025
10 checks passed
@eleanorjboyd eleanorjboyd deleted the copilot/fix-701 branch August 11, 2025 18:09
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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update PET command

3 participants