File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ import { ITerminalHelper } from '../common/terminal/types';
2828import { IRecommendedEnvironmentService } from '../interpreter/configuration/types' ;
2929import { CreateVirtualEnvTool } from './createVirtualEnvTool' ;
3030import { ISelectPythonEnvToolArguments , SelectPythonEnvTool } from './selectEnvTool' ;
31+ import { useEnvExtension } from '../envExt/api.internal' ;
3132
3233export class ConfigurePythonEnvTool implements LanguageModelTool < IResourceReference > {
3334 private readonly terminalExecutionService : TerminalCodeExecutionProvider ;
@@ -77,7 +78,10 @@ export class ConfigurePythonEnvTool implements LanguageModelTool<IResourceRefere
7778
7879 if ( await this . createEnvTool . shouldCreateNewVirtualEnv ( resource , token ) ) {
7980 try {
80- return await lm . invokeTool ( CreateVirtualEnvTool . toolName , options , token ) ;
81+ // If the Python Env extension is available, then use that.
82+ // create_quick_virtual_environment
83+ const toolName = useEnvExtension ( ) ? 'create_quick_virtual_environment' : CreateVirtualEnvTool . toolName ;
84+ return await lm . invokeTool ( toolName , options , token ) ;
8185 } catch ( ex ) {
8286 if ( isCancellationError ( ex ) ) {
8387 const input : ISelectPythonEnvToolArguments = {
You can’t perform that action at this time.
0 commit comments