Skip to content

Commit

Permalink
extract notebook controller kind into its own proposal, #131165
Browse files Browse the repository at this point in the history
  • Loading branch information
jrieken committed Nov 12, 2021
1 parent a4d426a commit 20382c5
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/vs/workbench/api/common/extHostNotebookKernels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,11 @@ export class ExtHostNotebookKernels implements ExtHostNotebookKernelsShape {
_update();
},
get kind() {
checkProposedApiEnabled(extension);
checkProposedApiEnabled(extension, 'notebookControllerKind');
return data.kind ?? '';
},
set kind(value) {
checkProposedApiEnabled(extension);
checkProposedApiEnabled(extension, 'notebookControllerKind');
data.kind = value;
_update();
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export const allApiProposals = Object.freeze({
notebookCellExecutionState: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookCellExecutionState.d.ts',
notebookConcatTextDocument: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookConcatTextDocument.d.ts',
notebookContentProvider: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookContentProvider.d.ts',
notebookControllerKind: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookControllerKind.d.ts',
notebookDebugOptions: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookDebugOptions.d.ts',
notebookDeprecated: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookDeprecated.d.ts',
notebookEditor: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookEditor.d.ts',
Expand Down
16 changes: 16 additions & 0 deletions src/vscode-dts/vscode.proposed.notebookControllerKind.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

declare module 'vscode' {

// https://github.com/microsoft/vscode-jupyter/issues/7373

export interface NotebookController {
/**
* The human-readable label used to categorise controllers.
*/
kind?: string;
}
}
4 changes: 0 additions & 4 deletions src/vscode-dts/vscode.proposed.notebookMessaging.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@ declare module 'vscode' {
}

export interface NotebookController {
/**
* The human-readable label used to categorise controllers.
*/
kind?: string;

// todo@API allow add, not remove
readonly rendererScripts: NotebookRendererScript[];
Expand Down

0 comments on commit 20382c5

Please sign in to comment.