Skip to content

Commit 23c5c4d

Browse files
authored
chat - make signInWithAlternateScopes default (#280355)
1 parent bc0c558 commit 23c5c4d

File tree

3 files changed

+7
-23
lines changed

3 files changed

+7
-23
lines changed

product.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,17 +116,17 @@
116116
},
117117
"providerUriSetting": "github-enterprise.uri",
118118
"providerScopes": [
119-
[
120-
"user:email"
121-
],
122-
[
123-
"read:user"
124-
],
125119
[
126120
"read:user",
127121
"user:email",
128122
"repo",
129123
"workflow"
124+
],
125+
[
126+
"user:email"
127+
],
128+
[
129+
"read:user"
130130
]
131131
],
132132
"entitlementUrl": "https://api.github.com/copilot_internal/user",

src/vs/workbench/contrib/chat/browser/chat.contribution.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -791,15 +791,6 @@ configurationRegistry.registerConfiguration({
791791
mode: 'auto'
792792
}
793793
},
794-
'chat.signInWithAlternateScopes': { // TODO@bpasero remove me eventually
795-
type: 'boolean',
796-
description: nls.localize('chat.signInWithAlternateScopes', "Controls whether sign-in with alternate scopes is used."),
797-
default: false,
798-
tags: ['experimental'],
799-
experiment: {
800-
mode: 'auto'
801-
}
802-
},
803794
'chat.extensionUnification.enabled': {
804795
type: 'boolean',
805796
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."),

src/vs/workbench/services/chat/common/chatEntitlementService.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1056,14 +1056,7 @@ export class ChatEntitlementRequests extends Disposable {
10561056
async signIn(options?: { useSocialProvider?: string; additionalScopes?: readonly string[] }) {
10571057
const providerId = ChatEntitlementRequests.providerId(this.configurationService);
10581058

1059-
let defaultProviderScopes: string[];
1060-
if (this.configurationService.getValue<unknown>('chat.signInWithAlternateScopes') === true) {
1061-
defaultProviderScopes = defaultChat.providerScopes.at(-1) ?? [];
1062-
} else {
1063-
defaultProviderScopes = defaultChat.providerScopes.at(0) ?? [];
1064-
}
1065-
1066-
const scopes = options?.additionalScopes ? distinct([...defaultProviderScopes, ...options.additionalScopes]) : defaultProviderScopes;
1059+
const scopes = options?.additionalScopes ? distinct([...defaultChat.providerScopes[0], ...options.additionalScopes]) : defaultChat.providerScopes[0];
10671060
const session = await this.authenticationService.createSession(
10681061
providerId,
10691062
scopes,

0 commit comments

Comments
 (0)