@@ -9,6 +9,7 @@ import { EventNames } from './common/telemetry/constants';
99import { sendManagerSelectionTelemetry } from './common/telemetry/helpers' ;
1010import { sendTelemetryEvent } from './common/telemetry/sender' ;
1111import { createDeferred } from './common/utils/deferred' ;
12+ import { isWindows } from './common/utils/platformUtils' ;
1213import {
1314 activeTerminal ,
1415 createLogOutputChannel ,
@@ -57,8 +58,8 @@ import {
5758import { ShellStartupActivationVariablesManagerImpl } from './features/terminal/shellStartupActivationVariablesManager' ;
5859import { cleanupStartupScripts } from './features/terminal/shellStartupSetupHandlers' ;
5960import { TerminalActivationImpl } from './features/terminal/terminalActivationState' ;
60- import { TerminalManager , TerminalManagerImpl } from './features/terminal/terminalManager' ;
6161import { TerminalEnvVarInjector } from './features/terminal/terminalEnvVarInjector' ;
62+ import { TerminalManager , TerminalManagerImpl } from './features/terminal/terminalManager' ;
6263import { getAutoActivationType , getEnvironmentForTerminal } from './features/terminal/utils' ;
6364import { EnvManagerView } from './features/views/envManagersView' ;
6465import { ProjectView } from './features/views/projectView' ;
@@ -241,10 +242,7 @@ export async function activate(context: ExtensionContext): Promise<PythonEnviron
241242 ) ;
242243
243244 // Initialize terminal environment variable injection
244- const terminalEnvVarInjector = new TerminalEnvVarInjector (
245- context . environmentVariableCollection ,
246- envVarManager ,
247- ) ;
245+ const terminalEnvVarInjector = new TerminalEnvVarInjector ( context . environmentVariableCollection , envVarManager ) ;
248246 context . subscriptions . push ( terminalEnvVarInjector ) ;
249247
250248 context . subscriptions . push (
@@ -450,23 +448,26 @@ export async function activate(context: ExtensionContext): Promise<PythonEnviron
450448 commands . registerCommand ( 'python-envs.runPetInTerminal' , async ( ) => {
451449 try {
452450 const petPath = await getNativePythonToolsPath ( ) ;
453-
451+
454452 // Show quick pick menu for PET operation selection
455- const selectedOption = await window . showQuickPick ( [
453+ const selectedOption = await window . showQuickPick (
454+ [
455+ {
456+ label : 'Find All Environments' ,
457+ description : 'Finds all environments and reports them to the standard output' ,
458+ detail : 'Runs: pet find --verbose' ,
459+ } ,
460+ {
461+ label : 'Resolve Environment...' ,
462+ description : 'Resolves & reports the details of the environment to the standard output' ,
463+ detail : 'Runs: pet resolve <path>' ,
464+ } ,
465+ ] ,
456466 {
457- label : 'Find All Environments' ,
458- description : 'Finds all environments and reports them to the standard output' ,
459- detail : 'Runs: pet find --verbose'
467+ placeHolder : 'Select a Python Environment Tool (PET) operation' ,
468+ ignoreFocusOut : true ,
460469 } ,
461- {
462- label : 'Resolve Environment...' ,
463- description : 'Resolves & reports the details of the environment to the standard output' ,
464- detail : 'Runs: pet resolve <path>'
465- }
466- ] , {
467- placeHolder : 'Select a Python Environment Tool (PET) operation' ,
468- ignoreFocusOut : true
469- } ) ;
470+ ) ;
470471
471472 if ( ! selectedOption ) {
472473 return ; // User cancelled
@@ -483,16 +484,17 @@ export async function activate(context: ExtensionContext): Promise<PythonEnviron
483484 traceInfo ( `Running PET find command: ${ petPath } find --verbose` ) ;
484485 } else if ( selectedOption . label === 'Resolve Environment...' ) {
485486 // Show input box for path
487+ const placeholder = isWindows ( ) ? 'C:\\path\\to\\python\\executable' : '/path/to/python/executable' ;
486488 const inputPath = await window . showInputBox ( {
487489 prompt : 'Enter the path to the Python executable to resolve' ,
488- placeHolder : '/path/to/python/executable' ,
490+ placeHolder : placeholder ,
489491 ignoreFocusOut : true ,
490492 validateInput : ( value ) => {
491493 if ( ! value || value . trim ( ) . length === 0 ) {
492494 return 'Please enter a valid path' ;
493495 }
494496 return null ;
495- }
497+ } ,
496498 } ) ;
497499
498500 if ( ! inputPath ) {
0 commit comments