@@ -96,26 +96,30 @@ export class ListPythonPackagesTool implements LanguageModelTool<IResourceRefere
9696 const resourcePath = resolveFilePath ( options . input . resourcePath ) ;
9797 const envName = await raceCancellationError ( getEnvDisplayName ( this . discovery , resourcePath , this . api ) , token ) ;
9898 return {
99- invocationMessage : envName ? l10n . t ( 'Listing packages in {0}' , envName ) : l10n . t ( 'Fetching Python environment information' ) ,
99+ invocationMessage : envName
100+ ? l10n . t ( 'Listing packages in {0}' , envName )
101+ : l10n . t ( 'Fetching Python environment information' ) ,
100102 } ;
101103 }
102104}
103105
104-
105- async function listPipPackages ( execFactory : IPythonExecutionFactory , resource : Uri | undefined ) : Promise < [ packageName :string , version :string ] [ ] > {
106+ async function listPipPackages (
107+ execFactory : IPythonExecutionFactory ,
108+ resource : Uri | undefined ,
109+ ) : Promise < [ string , string ] [ ] > {
106110 // Add option --format to subcommand list of pip cache, with abspath choice to output the full path of a wheel file. (#8355)
107111 // Added in 202. Thats almost 5 years ago. When Python 3.8 was released.
108112 const exec = await execFactory . createActivatedEnvironment ( { allowEnvironmentFetchExceptions : true , resource } ) ;
109113 const output = await exec . execModule ( 'pip' , [ 'list' ] , { throwOnStdErr : false , encoding : 'utf8' } ) ;
110- return parsePipList ( output . stdout ) . map ( ( pkg ) => [ pkg . name , pkg . version ] ) ;
114+ return parsePipList ( output . stdout ) . map ( ( pkg ) => [ pkg . name , pkg . version ] ) ;
111115}
112116
113117async function listCondaPackages (
114118 execFactory : IPythonExecutionFactory ,
115119 env : ResolvedEnvironment ,
116120 resource : Uri | undefined ,
117121 processService : IProcessService ,
118- ) : Promise < [ packageName : string , version : string ] [ ] > {
122+ ) : Promise < [ string , string ] [ ] > {
119123 const conda = await Conda . getConda ( ) ;
120124 if ( ! conda ) {
121125 traceError ( 'Conda is not installed, falling back to pip packages' ) ;
0 commit comments