diff --git a/packages/notebook/src/browser/view-model/notebook-model.ts b/packages/notebook/src/browser/view-model/notebook-model.ts index fb2470e371d7d..fe44f00fd1a08 100644 --- a/packages/notebook/src/browser/view-model/notebook-model.ts +++ b/packages/notebook/src/browser/view-model/notebook-model.ts @@ -187,7 +187,7 @@ export class NotebookModel implements Saveable, Disposable { throw new Error('could not read notebook snapshot'); } const data = JSON.parse(rawData) as NotebookData; - this.reset(data); + this.setData(data); } async revert(options?: Saveable.RevertOptions): Promise { @@ -212,7 +212,7 @@ export class NotebookModel implements Saveable, Disposable { } } - reset(data: NotebookData): void { + setData(data: NotebookData): void { // Replace all cells in the model this.replaceCells(0, this.cells.length, data.cells, false); this.metadata = data.metadata; diff --git a/packages/plugin-ext/src/main/browser/notebooks/notebook-documents-main.ts b/packages/plugin-ext/src/main/browser/notebooks/notebook-documents-main.ts index c117ebc2d5eaf..e17840b778e5d 100644 --- a/packages/plugin-ext/src/main/browser/notebooks/notebook-documents-main.ts +++ b/packages/plugin-ext/src/main/browser/notebooks/notebook-documents-main.ts @@ -162,7 +162,7 @@ export class NotebookDocumentsMainImpl implements NotebookDocumentsMain { // apply content changes... slightly HACKY -> this triggers a change event if (options.content) { const data = NotebookDto.fromNotebookDataDto(options.content); - ref.reset(data); + ref.setData(data); } return ref.uri.toComponents(); }