diff --git a/src/vs/workbench/api/common/extHost.api.impl.ts b/src/vs/workbench/api/common/extHost.api.impl.ts index 3b658592ed8..865ded63659 100644 --- a/src/vs/workbench/api/common/extHost.api.impl.ts +++ b/src/vs/workbench/api/common/extHost.api.impl.ts @@ -1257,10 +1257,6 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I // checkProposedApiEnabled(extension); return extHostTypes.CellKind; }, - get CellOutputKind() { - // checkProposedApiEnabled(extension); - return extHostTypes.CellOutputKind; - }, get NotebookCellRunState() { // checkProposedApiEnabled(extension); return extHostTypes.NotebookCellRunState; diff --git a/src/vs/workbench/api/common/extHostTypes.ts b/src/vs/workbench/api/common/extHostTypes.ts index 45c8dfe60de..96072d5c471 100644 --- a/src/vs/workbench/api/common/extHostTypes.ts +++ b/src/vs/workbench/api/common/extHostTypes.ts @@ -2890,46 +2890,10 @@ export class NotebookCellOutputItem { } export class NotebookCellOutput { - - // static _toOld(output: IOutputDto): vscode.CellOutput { - // if (output.data['application/x.notebook.stream']) { - // return { - // outputKind: CellOutputKind.Text, - // text: output.data['application/x.notebook.stream'] as string - // }; - // } else if (output.data['application/x.notebook.error-traceback']) { - // return { - // outputKind: CellOutputKind.Error, - // ename: (output.data['application/x.notebook.error-traceback'] as any)['ename'], - // evalue: (output.data['application/x.notebook.error-traceback'] as any)['evalue'], - // traceback: (output.data['application/x.notebook.error-traceback'] as any)['traceback'], - // }; - // } else { - // return { - // outputKind: CellOutputKind.Rich, - // data: output.data, - // metadata: output.metadata - // }; - // } - // } - - // static _fromOld(output: vscode.CellOutput, id?: string): NotebookCellOutput { - // switch (output.outputKind) { - // case CellOutputKind.Error: - // return new NotebookCellOutput([new NotebookCellOutputItem('application/x.notebook.error-traceback', output)]); - // case CellOutputKind.Text: - // return new NotebookCellOutput([new NotebookCellOutputItem('application/x.notebook.stream', output.text)]); - // case CellOutputKind.Rich: - // const items: NotebookCellOutputItem[] = []; - // for (const key in output.data) { - // items.push(new NotebookCellOutputItem(key, output.data[key], output.metadata?.custom ? output.metadata?.custom[key] : undefined)); - // } - // return new NotebookCellOutput(items, id); - // } - // throw new Error('invalid outputKind'); - // } - - constructor(readonly outputs: NotebookCellOutputItem[], readonly id: string = generateUuid()) { } + constructor( + readonly outputs: NotebookCellOutputItem[], + readonly id: string = generateUuid() + ) { } } export enum CellKind { @@ -2937,12 +2901,6 @@ export enum CellKind { Code = 2 } -export enum CellOutputKind { - Text = 1, - Error = 2, - Rich = 3 -} - export enum NotebookCellRunState { Running = 1, Idle = 2,