3
3
// Copyright (c) Microsoft Corporation. All rights reserved.
4
4
// Licensed under the MIT License.
5
5
6
- import { Event , Uri } from 'vscode' ;
6
+ import { Event , Terminal , Uri } from 'vscode' ;
7
7
import { Resource } from './common/types' ;
8
8
import { Architecture } from './common/utils/platform' ;
9
9
import { IDataViewerDataProvider , IJupyterUriProvider } from './jupyter/types' ;
@@ -117,11 +117,11 @@ export interface EnvironmentDetails {
117
117
// Support option of whether to run as a process or VSCode terminal.
118
118
// However note we cannot pass this into the debugger at the moment, as VSCode itself handles execution.
119
119
// Gotta add support in VSCode for that, they already support that for LSP.
120
+ // TODO: Gotta support this for upstream debugger
120
121
shellExec : Function ;
121
122
shellExecObservable : Function ;
122
123
exec : Function ;
123
124
execObservable : Function ;
124
- // createActivatedTerminal???
125
125
} ;
126
126
distributor ?: {
127
127
// PEP 514 (https://www.python.org/dev/peps/pep-0514/)
@@ -134,6 +134,22 @@ export interface EnvironmentDetails {
134
134
path : string ;
135
135
project ?: string ; // Any specific project environment is created for.
136
136
source : EnvSource [ ] ;
137
+ activationAPIs ?: // Contribute to this if you want Python extension to handle activation for any terminals that get created.
138
+ | {
139
+ usingEnvironmentVariableCollection : {
140
+ // TODO: Think of whether to pass in the extensions collection object here.
141
+ // Maybe we shouldn't pass it because other extension does not own the collections of the Python extensions?
142
+ setCollection ( ) : void ;
143
+ resetCollection ( ) : void ;
144
+ } ;
145
+ }
146
+ | {
147
+ usingTerminal : {
148
+ // Maybe we can also pass in the terminal type here with the terminal object
149
+ activateTerminal ( terminal : Terminal ) : Promise < boolean > ;
150
+ deactivateTerminal ( terminal : Terminal ) : Promise < boolean > ;
151
+ } ;
152
+ } ;
137
153
} ;
138
154
version : {
139
155
major : number ;
0 commit comments