import { AzureWizardPromptStep , IAzureQuickPickItem } from "vscode-azureextensionui" ; import { localize } from "../../../localize" ; import { IPythonVenvWizardContext } from "../../createNewProject/pythonSteps/IPythonVenvWizardContext" ; export class PythonVenvListStep extends AzureWizardPromptStep < IPythonVenvWizardContext > { public hideStepCount : boolean = true ; private readonly _venvs : string [ ] ; public constructor ( venvs ) { super ( ) ; this . _venvs = venvs ; } public async prompt ( context ) { const picks = this . _venvs . map ( venv => { return { label : venv , data : venv } ; } ) ; const placeHolder = localize ( 'selectVenv' , 'Select a virtual environment to use for your project' ) ; context . venvName = ( await context . ui . showQuickPick ( picks , { placeHolder , suppressPersistence : true } ) ) . data ; } public shouldPrompt ( context ) { return ! ! context . useExistingVenv && ! context . venvName ; } }