Skip to content

Commit

Permalink
Contribute to apis
Browse files Browse the repository at this point in the history
  • Loading branch information
Kartik Raj committed Aug 10, 2022
1 parent 8132dca commit eab8128
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions src/client/apiTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

import { Event, Uri } from 'vscode';
import { Event, Terminal, Uri } from 'vscode';
import { Resource } from './common/types';
import { Architecture } from './common/utils/platform';
import { IDataViewerDataProvider, IJupyterUriProvider } from './jupyter/types';
Expand Down Expand Up @@ -117,11 +117,11 @@ export interface EnvironmentDetails {
// Support option of whether to run as a process or VSCode terminal.
// However note we cannot pass this into the debugger at the moment, as VSCode itself handles execution.
// Gotta add support in VSCode for that, they already support that for LSP.
// TODO: Gotta support this for upstream debugger
shellExec: Function;
shellExecObservable: Function;
exec: Function;
execObservable: Function;
// createActivatedTerminal???
};
distributor?: {
// PEP 514 (https://www.python.org/dev/peps/pep-0514/)
Expand All @@ -134,6 +134,22 @@ export interface EnvironmentDetails {
path: string;
project?: string; // Any specific project environment is created for.
source: EnvSource[];
activationAPIs?: // Contribute to this if you want Python extension to handle activation for any terminals that get created.
| {
environmentVariableCollection: {
// TODO: Think of whether to pass in the extensions collection object here.
// Maybe we shouldn't pass it because other extension does not own the collections of the Python extensions?
setCollection(): void;
resetCollection(): void;
};
}
| {
terminal: {
// Maybe we can also pass in the terminal type here with the terminal object
activateTerminal(terminal: Terminal): Promise<boolean>;
deactivateTerminal(terminal: Terminal): Promise<boolean>;
};
};
};
version: {
major: number;
Expand Down

0 comments on commit eab8128

Please sign in to comment.