File tree 1 file changed +5
-1
lines changed 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';
28
28
import { IRecommendedEnvironmentService } from '../interpreter/configuration/types' ;
29
29
import { CreateVirtualEnvTool } from './createVirtualEnvTool' ;
30
30
import { ISelectPythonEnvToolArguments , SelectPythonEnvTool } from './selectEnvTool' ;
31
+ import { useEnvExtension } from '../envExt/api.internal' ;
31
32
32
33
export class ConfigurePythonEnvTool implements LanguageModelTool < IResourceReference > {
33
34
private readonly terminalExecutionService : TerminalCodeExecutionProvider ;
@@ -77,7 +78,10 @@ export class ConfigurePythonEnvTool implements LanguageModelTool<IResourceRefere
77
78
78
79
if ( await this . createEnvTool . shouldCreateNewVirtualEnv ( resource , token ) ) {
79
80
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 ) ;
81
85
} catch ( ex ) {
82
86
if ( isCancellationError ( ex ) ) {
83
87
const input : ISelectPythonEnvToolArguments = {
You can’t perform that action at this time.
0 commit comments