File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ interface ICommandNameWithoutArgumentTypeMapping {
4141 [ Commands . CreateNewFile ] : [ ] ;
4242 [ Commands . ReportIssue ] : [ ] ;
4343 [ LSCommands . RestartLS ] : [ ] ;
44+ [ 'python-envs.createTerminal' ] : [ ] ;
4445}
4546
4647export type AllCommands = keyof ICommandNameArgumentTypeMapping ;
Original file line number Diff line number Diff line change @@ -60,8 +60,13 @@ export class TerminalProvider implements Disposable {
6060
6161 @captureTelemetry ( EventName . TERMINAL_CREATE , { triggeredBy : 'commandpalette' } )
6262 private async onCreateTerminal ( ) {
63- const terminalService = this . serviceContainer . get < ITerminalServiceFactory > ( ITerminalServiceFactory ) ;
6463 const activeResource = this . activeResourceService . getActiveResource ( ) ;
64+ if ( useEnvExtension ( ) ) {
65+ const commandManager = this . serviceContainer . get < ICommandManager > ( ICommandManager ) ;
66+ await commandManager . executeCommand ( 'python-envs.createTerminal' , activeResource ) ;
67+ }
68+
69+ const terminalService = this . serviceContainer . get < ITerminalServiceFactory > ( ITerminalServiceFactory ) ;
6570 await terminalService . createTerminalService ( activeResource , 'Python' ) . show ( false ) ;
6671 }
6772}
You can’t perform that action at this time.
0 commit comments