mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-20 00:28:52 +01:00
Merge remote-tracking branch 'origin/main' into tyriar/profile_api
This commit is contained in:
@@ -219,7 +219,7 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
|
||||
})();
|
||||
|
||||
const authentication: typeof vscode.authentication = {
|
||||
getSession(providerId: string, scopes: string[], options?: vscode.AuthenticationGetSessionOptions) {
|
||||
getSession(providerId: string, scopes: readonly string[], options?: vscode.AuthenticationGetSessionOptions) {
|
||||
return extHostAuthentication.getSession(extension, providerId, scopes, options as any);
|
||||
},
|
||||
get onDidChangeSessions(): Event<vscode.AuthenticationSessionsChangeEvent> {
|
||||
@@ -316,16 +316,20 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
|
||||
allowContributedOpeners: options?.allowContributedOpeners,
|
||||
});
|
||||
},
|
||||
asExternalUri(uri: URI) {
|
||||
async asExternalUri(uri: URI) {
|
||||
if (uri.scheme === initData.environment.appUriScheme) {
|
||||
return extHostUrls.createAppUri(uri);
|
||||
}
|
||||
|
||||
if (!matchesScheme(uri.scheme, Schemas.http) && !matchesScheme(uri.scheme, Schemas.https)) {
|
||||
if (!matchesScheme(uri, Schemas.http) && !matchesScheme(uri, Schemas.https)) {
|
||||
checkProposedApiEnabled(extension); // https://github.com/microsoft/vscode/issues/124263
|
||||
}
|
||||
|
||||
return extHostWindow.asExternalUri(uri, { allowTunneling: !!initData.remote.authority });
|
||||
try {
|
||||
return await extHostWindow.asExternalUri(uri, { allowTunneling: !!initData.remote.authority });
|
||||
} catch {
|
||||
return uri;
|
||||
}
|
||||
},
|
||||
get remoteName() {
|
||||
return getRemoteName(initData.remote.authority);
|
||||
@@ -1001,10 +1005,10 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
|
||||
stopDebugging(session?: vscode.DebugSession) {
|
||||
return extHostDebugService.stopDebugging(session);
|
||||
},
|
||||
addBreakpoints(breakpoints: vscode.Breakpoint[]) {
|
||||
addBreakpoints(breakpoints: readonly vscode.Breakpoint[]) {
|
||||
return extHostDebugService.addBreakpoints(breakpoints);
|
||||
},
|
||||
removeBreakpoints(breakpoints: vscode.Breakpoint[]) {
|
||||
removeBreakpoints(breakpoints: readonly vscode.Breakpoint[]) {
|
||||
return extHostDebugService.removeBreakpoints(breakpoints);
|
||||
},
|
||||
asDebugSourceUri(source: vscode.DebugProtocolSource, session?: vscode.DebugSession): vscode.Uri {
|
||||
|
||||
Reference in New Issue
Block a user