Disable contributed openers by default in calls to openExternal

Fixes #114543

External and internal callers to openExternal may not expect (or want) their urls to be handled by a contributed opener. This change makes it so you have to explicitly enable using contributed openers when calling openExternal.

It also enables using contributed openers for a few places in our codebase
This commit is contained in:
Matt Bierner
2021-01-19 12:15:59 -08:00
parent fe81f9f5b2
commit c42b385bce
13 changed files with 69 additions and 25 deletions

View File

@@ -292,8 +292,11 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
get shell() {
return extHostTerminalService.getDefaultShell(false, configProvider);
},
openExternal(uri: URI) {
return extHostWindow.openUri(uri, { allowTunneling: !!initData.remote.authority });
openExternal(uri: URI, options?: { allowContributedOpeners?: boolean | string; }) {
return extHostWindow.openUri(uri, {
allowTunneling: !!initData.remote.authority,
allowContributedOpeners: options?.allowContributedOpeners,
});
},
asExternalUri(uri: URI) {
if (uri.scheme === initData.environment.appUriScheme) {