Skip to content

Commit a5c6803

Browse files
committed
Updates
1 parent e9df42d commit a5c6803

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/client/chat/configurePythonEnvTool.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import { ITerminalHelper } from '../common/terminal/types';
2828
import { IRecommendedEnvironmentService } from '../interpreter/configuration/types';
2929
import { CreateVirtualEnvTool } from './createVirtualEnvTool';
3030
import { ISelectPythonEnvToolArguments, SelectPythonEnvTool } from './selectEnvTool';
31+
import { useEnvExtension } from '../envExt/api.internal';
3132

3233
export 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 = {

0 commit comments

Comments
 (0)