11import * as fs from 'fs-extra' ;
22import * as path from 'path' ;
3- import {
4- commands ,
5- ProgressLocation ,
6- QuickInputButtons ,
7- TaskExecution ,
8- TaskRevealKind ,
9- Terminal ,
10- Uri ,
11- workspace ,
12- } from 'vscode' ;
3+ import { ProgressLocation , QuickInputButtons , TaskExecution , TaskRevealKind , Terminal , Uri , workspace } from 'vscode' ;
134import {
145 CreateEnvironmentOptions ,
156 PythonEnvironment ,
@@ -28,6 +19,7 @@ import {
2819} from '../internal.api' ;
2920import { removePythonProjectSetting , setEnvironmentManager , setPackageManager } from './settings/settingHelpers' ;
3021
22+ import { executeCommand } from '../common/command.api' ;
3123import { clipboardWriteText } from '../common/env.apis' ;
3224import { } from '../common/errors/utils' ;
3325import { Pickers } from '../common/localize' ;
@@ -470,7 +462,7 @@ export async function addPythonProjectCommand(
470462 'Open Folder' ,
471463 ) ;
472464 if ( r === 'Open Folder' ) {
473- await commands . executeCommand ( 'vscode.openFolder' ) ;
465+ await executeCommand ( 'vscode.openFolder' ) ;
474466 return ;
475467 }
476468 }
@@ -747,7 +739,7 @@ export async function copyPathToClipboard(item: unknown): Promise<void> {
747739export async function revealProjectInExplorer ( item : unknown ) : Promise < void > {
748740 if ( item instanceof ProjectItem ) {
749741 const projectUri = item . project . uri ;
750- await commands . executeCommand ( 'revealInExplorer' , projectUri ) ;
742+ await executeCommand ( 'revealInExplorer' , projectUri ) ;
751743 } else {
752744 traceVerbose ( `Invalid context for reveal project in explorer: ${ item } ` ) ;
753745 }
@@ -758,7 +750,7 @@ export async function revealProjectInExplorer(item: unknown): Promise<void> {
758750 */
759751export async function revealEnvInManagerView ( item : unknown , managerView : EnvManagerView ) : Promise < void > {
760752 if ( item instanceof ProjectEnvironment ) {
761- await commands . executeCommand ( 'env-managers.focus' ) ;
753+ await executeCommand ( 'env-managers.focus' ) ;
762754 await managerView . reveal ( item . environment ) ;
763755 return ;
764756 }
0 commit comments