Skip to content

Untitled file service doesn't work with notebook view types #121974

@brettfo

Description

@brettfo
  • VS Code Version: Insiders
  • OS Version: Windows

Steps to Reproduce:

  1. Currently developing the .NET Interactive Notebooks extension (ms-dotnettools.dotnet-interactive-vscode)
  2. Our extension registers the notebook view type dotnet-interactive for files of type *.dib.
  3. When we try to create a new untitled notebook, we get an error: The file working copy resource untitled:Untitled-1.dib does not have an associated file system provider.

The following all fail in similar ways and all have the following code immediately preceeding this failure:

const viewType = 'dotnet-interactive'; // this was registered in `package.json`
const fileName = 'Untitled-1.dib'; // note, there is no existing editor with this name
const newUri = vscode.Uri.file(fileName).with({ scheme: 'untitled', path: fileName });
  1. vscode.commands.executeCommand('vscode.openWith', newUri);
  2. vscode.commands.executeCommand('vscode.openWith', newUri, viewType);
  3. vscode.notebook.openNotebookDocument(newUri);

This one just opens a text document, not a notebook:

  • vscode.commands.executeCommand('workbench.action.files.newUntitledFile', viewType);

Does this issue occur when all extensions are disabled?: N/A

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions