mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-18 15:55:59 +01:00
Move to new account preference concept (#228897)
* Move to new account preference concept Previously, session preference was at a per-"set of scopes" bases. This means that an extension could ask for scopes A,B,C and get account 1... but then ask for scopes E,F and get account 2. Thinking on this more, it really doesn't make sense. An extension should have a preference wholistically since we also don't surface scopes to the user. This PR: * changes that model (while keeping the old model for migration purposes for now) * allows the user to change that value via the gear icon in the Trusted Extensions quick pick * hooks up the extension event for when the user changes that * lastly introduces a product.json entry that allows an extension to be a "child" of another extension's preference. This will be useful for GitHub Copilot & GitHub Copilot Chat sharing the same preference. Out of scope: * Adding entries to the extension editor to get to this quick pick (it'll come later, but I wanted to get these changes in now) * placeholder
This commit is contained in:
committed by
GitHub
parent
1cfe5276d3
commit
7241eea610
@@ -302,7 +302,7 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
|
||||
return !!(await extHostAuthentication.getSession(extension, providerId, scopes, { silent: true } as any));
|
||||
},
|
||||
get onDidChangeSessions(): vscode.Event<vscode.AuthenticationSessionsChangeEvent> {
|
||||
return _asExtensionEvent(extHostAuthentication.onDidChangeSessions);
|
||||
return _asExtensionEvent(extHostAuthentication.getExtensionScopedSessionsEvent(extension.identifier.value));
|
||||
},
|
||||
registerAuthenticationProvider(id: string, label: string, provider: vscode.AuthenticationProvider, options?: vscode.AuthenticationProviderOptions): vscode.Disposable {
|
||||
return extHostAuthentication.registerAuthenticationProvider(id, label, provider, options);
|
||||
|
||||
Reference in New Issue
Block a user