File tree Expand file tree Collapse file tree 3 files changed +24
-0
lines changed Expand file tree Collapse file tree 3 files changed +24
-0
lines changed Original file line number Diff line number Diff line change 520520 " chatParticipantPrivate" ,
521521 " chatParticipantAdditions" ,
522522 " chatVariableResolver" ,
523+ " terminalShellEnv" ,
523524 " terminalShellType"
524525 ]
525526}
Original file line number Diff line number Diff line change @@ -375,6 +375,11 @@ export class TerminalManagerImpl implements TerminalManager {
375375 }
376376
377377 public isActivated ( terminal : Terminal , environment ?: PythonEnvironment ) : boolean {
378+ const envVar = terminal . shellIntegration ?. env ;
379+ if ( envVar ) {
380+ return ! ! envVar [ 'VIRTUAL_ENV' ] ;
381+ }
382+
378383 if ( ! environment ) {
379384 return this . activatedTerminals . has ( terminal ) ;
380385 }
Original file line number Diff line number Diff line change 1+ /*---------------------------------------------------------------------------------------------
2+ * Copyright (c) Microsoft Corporation. All rights reserved.
3+ * Licensed under the MIT License. See License.txt in the project root for license information.
4+ *--------------------------------------------------------------------------------------------*/
5+
6+ declare module 'vscode' {
7+ // @anthonykim 1 @tyriar https://github.com/microsoft/vscode/issues/227467
8+
9+ export interface TerminalShellIntegration {
10+ /**
11+ * The environment of the shell process. This is undefined if the shell integration script
12+ * does not send the environment.
13+ */
14+ readonly env : { [ key : string ] : string | undefined } | undefined ;
15+ }
16+
17+ // TODO: Is it fine that this shares onDidChangeTerminalShellIntegration with cwd and the shellIntegration object itself?
18+ }
You can’t perform that action at this time.
0 commit comments