Skip to content

fix: ensure that we use new extension when available for terminal creation #24983

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/client/common/application/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,5 @@ export interface ICommandNameArgumentTypeMapping extends ICommandNameWithoutArgu
},
];
['cursorEnd']: [];
['python-envs.createTerminal']: [undefined | Uri];
}
7 changes: 6 additions & 1 deletion src/client/providers/terminalProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,13 @@ export class TerminalProvider implements Disposable {

@captureTelemetry(EventName.TERMINAL_CREATE, { triggeredBy: 'commandpalette' })
private async onCreateTerminal() {
const terminalService = this.serviceContainer.get<ITerminalServiceFactory>(ITerminalServiceFactory);
const activeResource = this.activeResourceService.getActiveResource();
if (useEnvExtension()) {
const commandManager = this.serviceContainer.get<ICommandManager>(ICommandManager);
await commandManager.executeCommand('python-envs.createTerminal', activeResource);
}

const terminalService = this.serviceContainer.get<ITerminalServiceFactory>(ITerminalServiceFactory);
await terminalService.createTerminalService(activeResource, 'Python').show(false);
}
}
Loading