Skip to content

Commit e77e787

Browse files
author
Kartik Raj
committed
Contribute to apis
1 parent 8132dca commit e77e787

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

src/client/apiTypes.ts

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// Copyright (c) Microsoft Corporation. All rights reserved.
44
// Licensed under the MIT License.
55

6-
import { Event, Uri } from 'vscode';
6+
import { Event, Terminal, Uri } from 'vscode';
77
import { Resource } from './common/types';
88
import { Architecture } from './common/utils/platform';
99
import { IDataViewerDataProvider, IJupyterUriProvider } from './jupyter/types';
@@ -117,11 +117,11 @@ export interface EnvironmentDetails {
117117
// Support option of whether to run as a process or VSCode terminal.
118118
// However note we cannot pass this into the debugger at the moment, as VSCode itself handles execution.
119119
// Gotta add support in VSCode for that, they already support that for LSP.
120+
// TODO: Gotta support this for upstream debugger
120121
shellExec: Function;
121122
shellExecObservable: Function;
122123
exec: Function;
123124
execObservable: Function;
124-
// createActivatedTerminal???
125125
};
126126
distributor?: {
127127
// PEP 514 (https://www.python.org/dev/peps/pep-0514/)
@@ -134,6 +134,22 @@ export interface EnvironmentDetails {
134134
path: string;
135135
project?: string; // Any specific project environment is created for.
136136
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+
};
137153
};
138154
version: {
139155
major: number;

0 commit comments

Comments
 (0)