Skip to content

Allow vscode.env.asExternalUri to return valid results for workspace URIs #124263

@joaomoreno

Description

@joaomoreno

Our current API vscode.env.asExternalUri currently does two things:

  • For /^https?/ URIs, it translates remote URIs into URIs which can be handled locally
  • For ${appScheme} URIs, it massages extension handling URIs

What if we augment that API to handle any URI scheme, namely URIs which represent workspaces? Here's how that could look like:

  • On the desktop, the API would return a URI with the ${appScheme} protocol which would open the given workspace when invoked. So, asExternalUri('file://Users/joao/Desktop') would return something like vscode://open?uri=file%3A%2F%2FUsers%2Fjoao%2FDesktop.
  • On an embedder web scenario like, the API would return the exact URL which would be open in the browser if invoked with vscode.open.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions