mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-10 00:27:05 -06:00
chat - make signInWithAlternateScopes default (#280355)
This commit is contained in:
parent
bc0c55891c
commit
23c5c4d1cf
12
product.json
12
product.json
@ -116,17 +116,17 @@
|
||||
},
|
||||
"providerUriSetting": "github-enterprise.uri",
|
||||
"providerScopes": [
|
||||
[
|
||||
"user:email"
|
||||
],
|
||||
[
|
||||
"read:user"
|
||||
],
|
||||
[
|
||||
"read:user",
|
||||
"user:email",
|
||||
"repo",
|
||||
"workflow"
|
||||
],
|
||||
[
|
||||
"user:email"
|
||||
],
|
||||
[
|
||||
"read:user"
|
||||
]
|
||||
],
|
||||
"entitlementUrl": "https://api.github.com/copilot_internal/user",
|
||||
|
||||
@ -791,15 +791,6 @@ configurationRegistry.registerConfiguration({
|
||||
mode: 'auto'
|
||||
}
|
||||
},
|
||||
'chat.signInWithAlternateScopes': { // TODO@bpasero remove me eventually
|
||||
type: 'boolean',
|
||||
description: nls.localize('chat.signInWithAlternateScopes', "Controls whether sign-in with alternate scopes is used."),
|
||||
default: false,
|
||||
tags: ['experimental'],
|
||||
experiment: {
|
||||
mode: 'auto'
|
||||
}
|
||||
},
|
||||
'chat.extensionUnification.enabled': {
|
||||
type: 'boolean',
|
||||
description: nls.localize('chat.extensionUnification.enabled', "Enables the unification of GitHub Copilot extensions. When enabled, all GitHub Copilot functionality is served from the GitHub Copilot Chat extension. When disabled, the GitHub Copilot and GitHub Copilot Chat extensions operate independently."),
|
||||
|
||||
@ -1056,14 +1056,7 @@ export class ChatEntitlementRequests extends Disposable {
|
||||
async signIn(options?: { useSocialProvider?: string; additionalScopes?: readonly string[] }) {
|
||||
const providerId = ChatEntitlementRequests.providerId(this.configurationService);
|
||||
|
||||
let defaultProviderScopes: string[];
|
||||
if (this.configurationService.getValue<unknown>('chat.signInWithAlternateScopes') === true) {
|
||||
defaultProviderScopes = defaultChat.providerScopes.at(-1) ?? [];
|
||||
} else {
|
||||
defaultProviderScopes = defaultChat.providerScopes.at(0) ?? [];
|
||||
}
|
||||
|
||||
const scopes = options?.additionalScopes ? distinct([...defaultProviderScopes, ...options.additionalScopes]) : defaultProviderScopes;
|
||||
const scopes = options?.additionalScopes ? distinct([...defaultChat.providerScopes[0], ...options.additionalScopes]) : defaultChat.providerScopes[0];
|
||||
const session = await this.authenticationService.createSession(
|
||||
providerId,
|
||||
scopes,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user