diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index 9a490e60039..d66dd7a0bb7 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -1354,6 +1354,7 @@ declare module 'vscode' { readonly visibleRanges: ReadonlyArray; } + // todo@API make class // todo@API support ids https://github.com/jupyter/enhancement-proposals/blob/master/62-cell-id/cell-id.md export interface NotebookCellData { readonly cellKind: NotebookCellKind; @@ -1364,6 +1365,7 @@ declare module 'vscode' { readonly metadata: NotebookCellMetadata | undefined; } + // todo@API make class export interface NotebookData { readonly cells: NotebookCellData[]; readonly metadata: NotebookDocumentMetadata; @@ -1622,14 +1624,18 @@ declare module 'vscode' { // export const onDidStopNotebookCellExecution: Event; export interface NotebookKernel { + + // todo@API make this mandatory? readonly id?: string; + label: string; description?: string; detail?: string; isPreferred?: boolean; + + // todo@API is this maybe an output property? preloads?: Uri[]; - // TODO@API control runnable state of cell /** * languages supported by kernel * - first is preferred @@ -1637,6 +1643,10 @@ declare module 'vscode' { */ supportedLanguages?: string[]; + // todo@API kernel updating itself + // fired when properties like the supported languages etc change + // onDidChangeProperties?: Event + // @roblourens // todo@API change to `executeCells(document: NotebookDocument, cells: NotebookCellRange[], context:{isWholeNotebooke: boolean}, token: CancelationToken): void;` // todo@API interrupt vs cancellation, https://github.com/microsoft/vscode/issues/106741 diff --git a/src/vs/workbench/api/common/extHost.api.impl.ts b/src/vs/workbench/api/common/extHost.api.impl.ts index f94ae844aea..6b78c510006 100644 --- a/src/vs/workbench/api/common/extHost.api.impl.ts +++ b/src/vs/workbench/api/common/extHost.api.impl.ts @@ -1023,15 +1023,7 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I }; // namespace: notebook - const notebook: (typeof vscode.notebook & { - // to ensure that notebook extensions not break before they update APIs. - visibleNotebookEditors: vscode.NotebookEditor[]; - onDidChangeVisibleNotebookEditors: Event; - activeNotebookEditor: vscode.NotebookEditor | undefined; - onDidChangeActiveNotebookEditor: Event; - onDidChangeNotebookEditorSelection: Event; - onDidChangeNotebookEditorVisibleRanges: Event; - }) = { + const notebook: typeof vscode.notebook = { openNotebookDocument: (uriComponents, viewType) => { checkProposedApiEnabled(extension); return extHostNotebook.openNotebookDocument(uriComponents, viewType); @@ -1052,14 +1044,6 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I checkProposedApiEnabled(extension); return extHostNotebook.notebookDocuments.map(d => d.notebookDocument); }, - get visibleNotebookEditors(): vscode.NotebookEditor[] { - checkProposedApiEnabled(extension); - return extHostNotebook.visibleNotebookEditors; - }, - get onDidChangeVisibleNotebookEditors() { - checkProposedApiEnabled(extension); - return extHostNotebook.onDidChangeVisibleNotebookEditors; - }, get onDidChangeActiveNotebookKernel() { checkProposedApiEnabled(extension); return extHostNotebook.onDidChangeActiveNotebookKernel; @@ -1079,14 +1063,6 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I checkProposedApiEnabled(extension); return extHostNotebook.createNotebookEditorDecorationType(options); }, - get activeNotebookEditor(): vscode.NotebookEditor | undefined { - checkProposedApiEnabled(extension); - return extHostNotebook.activeNotebookEditor; - }, - onDidChangeActiveNotebookEditor(listener, thisArgs?, disposables?) { - checkProposedApiEnabled(extension); - return extHostNotebook.onDidChangeActiveNotebookEditor(listener, thisArgs, disposables); - }, onDidChangeNotebookDocumentMetadata(listener, thisArgs?, disposables?) { checkProposedApiEnabled(extension); return extHostNotebook.onDidChangeNotebookDocumentMetadata(listener, thisArgs, disposables); @@ -1095,14 +1071,6 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I checkProposedApiEnabled(extension); return extHostNotebook.onDidChangeNotebookCells(listener, thisArgs, disposables); }, - onDidChangeNotebookEditorSelection(listener, thisArgs?, disposables?) { - checkProposedApiEnabled(extension); - return extHostNotebook.onDidChangeNotebookEditorSelection(listener, thisArgs, disposables); - }, - onDidChangeNotebookEditorVisibleRanges(listener, thisArgs?, disposables?) { - checkProposedApiEnabled(extension); - return extHostNotebook.onDidChangeNotebookEditorVisibleRanges(listener, thisArgs, disposables); - }, onDidChangeCellOutputs(listener, thisArgs?, disposables?) { checkProposedApiEnabled(extension); return extHostNotebook.onDidChangeCellOutputs(listener, thisArgs, disposables);