Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,10 @@ class SimpleNotebookWorkingCopyEditorHandler extends Disposable implements IWork
await this._extensionService.whenInstalledExtensionsRegistered();

this._register(this._workingCopyEditorService.registerHandler({
handles: workingCopy => typeof this._getViewType(workingCopy) === 'string',
handles: workingCopy => {
const viewType = this._getViewType(workingCopy);
return typeof viewType === 'string' && viewType !== 'interactive';
},
isOpen: (workingCopy, editor) => editor instanceof NotebookEditorInput && editor.viewType === this._getViewType(workingCopy) && isEqual(workingCopy.resource, editor.resource),
createEditor: workingCopy => NotebookEditorInput.create(this._instantiationService, workingCopy.resource, this._getViewType(workingCopy)!)
}));
Expand Down
10 changes: 8 additions & 2 deletions src/vs/workbench/contrib/notebook/common/notebookEditorModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,14 @@ export class NotebookFileWorkingCopyModelFactory implements IStoredFileWorkingCo
throw new Error('CANNOT open file notebook with this provider');
}

const bytes = await streamToBuffer(stream);
const data = await info.serializer.dataToNotebook(bytes);
let data: NotebookData = {
metadata: {},
cells: []
};
if (resource.scheme !== Schemas.vscodeInteractive) {
const bytes = await streamToBuffer(stream);
data = await info.serializer.dataToNotebook(bytes);
}

if (token.isCancellationRequested) {
throw new CancellationError();
Expand Down