Extensions do not update cell outputs/metadata directly.

This commit is contained in:
rebornix
2021-02-04 16:35:50 -08:00
parent 4d6d2266fa
commit f2b87fd6cd
4 changed files with 11 additions and 83 deletions

View File

@@ -569,29 +569,6 @@ export class MainThreadNotebooks extends Disposable implements MainThreadNoteboo
textModel?.updateLanguages(languages);
}
async $spliceNotebookCellOutputs(viewType: string, resource: UriComponents, cellHandle: number, splices: NotebookCellOutputsSplice[]): Promise<void> {
this.logService.debug('MainThreadNotebooks#spliceNotebookCellOutputs', resource.path, cellHandle);
const textModel = this._notebookService.getNotebookTextModel(URI.from(resource));
if (!textModel) {
return;
}
const cell = textModel.cells.find(cell => cell.handle === cellHandle);
if (!cell) {
return;
}
textModel.applyEdits(textModel.versionId, [
{
editType: CellEditType.OutputsSplice,
index: textModel.cells.indexOf(cell),
splices
}
], true, undefined, () => undefined, undefined);
}
async $postMessage(editorId: string, forRendererId: string | undefined, value: any): Promise<boolean> {
const editor = this._notebookService.getNotebookEditor(editorId) as INotebookEditor | undefined;
if (editor?.isNotebookEditor) {