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.
Our current API
vscode.env.asExternalUricurrently does two things:/^https?/URIs, it translates remote URIs into URIs which can be handled locally${appScheme}URIs, it massages extension handling URIsWhat if we augment that API to handle any URI scheme, namely URIs which represent workspaces? Here's how that could look like:
${appScheme}protocol which would open the given workspace when invoked. So,asExternalUri('file://Users/joao/Desktop')would return something likevscode://open?uri=file%3A%2F%2FUsers%2Fjoao%2FDesktop.vscode.open.