@codingame/monaco-vscode-authentication-service-override 31.0.1 → 32.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/vscode/src/vs/workbench/contrib/authentication/browser/actions/manageAccountPreferencesForExtensionAction.js +12 -12
- package/vscode/src/vs/workbench/contrib/authentication/browser/actions/manageAccountPreferencesForMcpServerAction.js +10 -10
- package/vscode/src/vs/workbench/contrib/authentication/browser/actions/manageAccountsAction.js +9 -9
- package/vscode/src/vs/workbench/contrib/authentication/browser/actions/manageDynamicAuthenticationProvidersAction.js +9 -9
- package/vscode/src/vs/workbench/contrib/authentication/browser/actions/manageTrustedExtensionsForAccountAction.js +12 -12
- package/vscode/src/vs/workbench/contrib/authentication/browser/actions/manageTrustedMcpServersForAccountAction.js +11 -11
- package/vscode/src/vs/workbench/contrib/authentication/browser/actions/signOutOfAccountAction.js +4 -4
- package/vscode/src/vs/workbench/contrib/authentication/browser/authentication.contribution.js +2 -2
- package/vscode/src/vs/workbench/services/authentication/browser/authenticationExtensionsService.js +9 -9
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-authentication-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "32.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - authentication service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-api": "
|
|
18
|
+
"@codingame/monaco-vscode-api": "32.0.0"
|
|
19
19
|
},
|
|
20
20
|
"main": "index.js",
|
|
21
21
|
"module": "index.js",
|
|
@@ -16,8 +16,8 @@ class ManageAccountPreferencesForExtensionAction extends Action2 {
|
|
|
16
16
|
constructor() {
|
|
17
17
|
super({
|
|
18
18
|
id: "_manageAccountPreferencesForExtension",
|
|
19
|
-
title: ( localize2(
|
|
20
|
-
category: ( localize2(
|
|
19
|
+
title: ( localize2(4598, "Manage Extension Account Preferences...")),
|
|
20
|
+
category: ( localize2(4599, "Accounts")),
|
|
21
21
|
f1: true,
|
|
22
22
|
menu: [{
|
|
23
23
|
id: MenuId.AccountsContext,
|
|
@@ -56,8 +56,8 @@ let ManageAccountPreferenceForExtensionActionImpl = class ManageAccountPreferenc
|
|
|
56
56
|
label: ext.displayName ?? ext.name,
|
|
57
57
|
id: ext.identifier.value
|
|
58
58
|
}))), {
|
|
59
|
-
placeHolder: ( localize(
|
|
60
|
-
title: ( localize(
|
|
59
|
+
placeHolder: ( localize(4600, "Select an extension to manage account preferences for")),
|
|
60
|
+
title: ( localize(4601, "Manage Extension Account Preferences"))
|
|
61
61
|
});
|
|
62
62
|
extensionId = result?.id;
|
|
63
63
|
}
|
|
@@ -72,7 +72,7 @@ let ManageAccountPreferenceForExtensionActionImpl = class ManageAccountPreferenc
|
|
|
72
72
|
const extensionQuery = this._authenticationQueryService.extension(extensionId);
|
|
73
73
|
const providersWithAccess = await extensionQuery.getProvidersWithAccess();
|
|
74
74
|
if (!providersWithAccess.length) {
|
|
75
|
-
await this._dialogService.info(( localize(
|
|
75
|
+
await this._dialogService.info(( localize(4602, "This extension has not used any accounts yet.")));
|
|
76
76
|
return;
|
|
77
77
|
}
|
|
78
78
|
providerId = providersWithAccess[0];
|
|
@@ -82,10 +82,10 @@ let ManageAccountPreferenceForExtensionActionImpl = class ManageAccountPreferenc
|
|
|
82
82
|
id: providerId
|
|
83
83
|
}))), {
|
|
84
84
|
placeHolder: ( localize(
|
|
85
|
-
|
|
85
|
+
4603,
|
|
86
86
|
"Select an authentication provider to manage account preferences for"
|
|
87
87
|
)),
|
|
88
|
-
title: ( localize(
|
|
88
|
+
title: ( localize(4601, "Manage Extension Account Preferences"))
|
|
89
89
|
});
|
|
90
90
|
if (!result) {
|
|
91
91
|
return;
|
|
@@ -108,7 +108,7 @@ let ManageAccountPreferenceForExtensionActionImpl = class ManageAccountPreferenc
|
|
|
108
108
|
items.push({
|
|
109
109
|
providerId,
|
|
110
110
|
scopes: lastUsedScopes,
|
|
111
|
-
label: ( localize(
|
|
111
|
+
label: ( localize(4604, "Use a new account..."))
|
|
112
112
|
});
|
|
113
113
|
}
|
|
114
114
|
}
|
|
@@ -134,12 +134,12 @@ let ManageAccountPreferenceForExtensionActionImpl = class ManageAccountPreferenc
|
|
|
134
134
|
disposableStore.dispose();
|
|
135
135
|
}));
|
|
136
136
|
picker.placeholder = ( localize(
|
|
137
|
-
|
|
137
|
+
4605,
|
|
138
138
|
"Manage '{0}' account preferences for {1}...",
|
|
139
139
|
extensionLabel,
|
|
140
140
|
providerLabel
|
|
141
141
|
));
|
|
142
|
-
picker.title = ( localize(
|
|
142
|
+
picker.title = ( localize(4606, "'{0}' Account Preferences For This Workspace", extensionLabel));
|
|
143
143
|
picker.sortByLabel = false;
|
|
144
144
|
disposableStore.add(picker.onDidAccept(async () => {
|
|
145
145
|
picker.hide();
|
|
@@ -152,7 +152,7 @@ let ManageAccountPreferenceForExtensionActionImpl = class ManageAccountPreferenc
|
|
|
152
152
|
label: a.label,
|
|
153
153
|
account: a,
|
|
154
154
|
providerId,
|
|
155
|
-
description: ( localize(
|
|
155
|
+
description: ( localize(4607, "Current account")),
|
|
156
156
|
picked: true
|
|
157
157
|
} : {
|
|
158
158
|
label: a.label,
|
|
@@ -161,7 +161,7 @@ let ManageAccountPreferenceForExtensionActionImpl = class ManageAccountPreferenc
|
|
|
161
161
|
}));
|
|
162
162
|
}
|
|
163
163
|
_handleNoAccounts(picker) {
|
|
164
|
-
picker.validationMessage = ( localize(
|
|
164
|
+
picker.validationMessage = ( localize(4608, "No accounts are currently used by this extension."));
|
|
165
165
|
picker.buttons = [this._quickInputService.backButton];
|
|
166
166
|
picker.show();
|
|
167
167
|
return Event.filter(picker.onDidTriggerButton, e => e === this._quickInputService.backButton)(() => this.run());
|
|
@@ -16,8 +16,8 @@ class ManageAccountPreferencesForMcpServerAction extends Action2 {
|
|
|
16
16
|
constructor() {
|
|
17
17
|
super({
|
|
18
18
|
id: "_manageAccountPreferencesForMcpServer",
|
|
19
|
-
title: ( localize2(
|
|
20
|
-
category: ( localize2(
|
|
19
|
+
title: ( localize2(4609, "Manage MCP Server Account Preferences")),
|
|
20
|
+
category: ( localize2(4610, "Accounts")),
|
|
21
21
|
f1: false
|
|
22
22
|
});
|
|
23
23
|
}
|
|
@@ -53,7 +53,7 @@ let ManageAccountPreferenceForMcpServerActionImpl = class ManageAccountPreferenc
|
|
|
53
53
|
const mcpServerQuery = this._authenticationQueryService.mcpServer(mcpServerId);
|
|
54
54
|
const providersWithAccess = await mcpServerQuery.getProvidersWithAccess();
|
|
55
55
|
if (!providersWithAccess.length) {
|
|
56
|
-
await this._dialogService.info(( localize(
|
|
56
|
+
await this._dialogService.info(( localize(4611, "This MCP server has not used any accounts yet.")));
|
|
57
57
|
return;
|
|
58
58
|
}
|
|
59
59
|
providerId = providersWithAccess[0];
|
|
@@ -63,10 +63,10 @@ let ManageAccountPreferenceForMcpServerActionImpl = class ManageAccountPreferenc
|
|
|
63
63
|
id: providerId
|
|
64
64
|
}))), {
|
|
65
65
|
placeHolder: ( localize(
|
|
66
|
-
|
|
66
|
+
4612,
|
|
67
67
|
"Select an authentication provider to manage account preferences for"
|
|
68
68
|
)),
|
|
69
|
-
title: ( localize(
|
|
69
|
+
title: ( localize(4613, "Manage MCP Server Account Preferences"))
|
|
70
70
|
});
|
|
71
71
|
if (!result) {
|
|
72
72
|
return;
|
|
@@ -89,7 +89,7 @@ let ManageAccountPreferenceForMcpServerActionImpl = class ManageAccountPreferenc
|
|
|
89
89
|
items.push({
|
|
90
90
|
providerId: providerId,
|
|
91
91
|
scopes: lastUsedScopes,
|
|
92
|
-
label: ( localize(
|
|
92
|
+
label: ( localize(4614, "Use a new account..."))
|
|
93
93
|
});
|
|
94
94
|
}
|
|
95
95
|
}
|
|
@@ -110,12 +110,12 @@ let ManageAccountPreferenceForMcpServerActionImpl = class ManageAccountPreferenc
|
|
|
110
110
|
disposableStore.dispose();
|
|
111
111
|
}));
|
|
112
112
|
picker.placeholder = ( localize(
|
|
113
|
-
|
|
113
|
+
4615,
|
|
114
114
|
"Manage '{0}' account preferences for {1}...",
|
|
115
115
|
mcpServerLabel,
|
|
116
116
|
providerLabel
|
|
117
117
|
));
|
|
118
|
-
picker.title = ( localize(
|
|
118
|
+
picker.title = ( localize(4616, "'{0}' Account Preferences For This Workspace", mcpServerLabel));
|
|
119
119
|
picker.sortByLabel = false;
|
|
120
120
|
disposableStore.add(picker.onDidAccept(async () => {
|
|
121
121
|
picker.hide();
|
|
@@ -128,7 +128,7 @@ let ManageAccountPreferenceForMcpServerActionImpl = class ManageAccountPreferenc
|
|
|
128
128
|
label: a.label,
|
|
129
129
|
account: a,
|
|
130
130
|
providerId,
|
|
131
|
-
description: ( localize(
|
|
131
|
+
description: ( localize(4617, "Current account")),
|
|
132
132
|
picked: true
|
|
133
133
|
} : {
|
|
134
134
|
label: a.label,
|
|
@@ -137,7 +137,7 @@ let ManageAccountPreferenceForMcpServerActionImpl = class ManageAccountPreferenc
|
|
|
137
137
|
}));
|
|
138
138
|
}
|
|
139
139
|
_handleNoAccounts(picker) {
|
|
140
|
-
picker.validationMessage = ( localize(
|
|
140
|
+
picker.validationMessage = ( localize(4618, "No accounts are currently used by this MCP server."));
|
|
141
141
|
picker.buttons = [this._quickInputService.backButton];
|
|
142
142
|
picker.show();
|
|
143
143
|
return Event.filter(picker.onDidTriggerButton, e => e === this._quickInputService.backButton)(() => this.run());
|
package/vscode/src/vs/workbench/contrib/authentication/browser/actions/manageAccountsAction.js
CHANGED
|
@@ -16,8 +16,8 @@ class ManageAccountsAction extends Action2 {
|
|
|
16
16
|
constructor() {
|
|
17
17
|
super({
|
|
18
18
|
id: "workbench.action.manageAccounts",
|
|
19
|
-
title: ( localize2(
|
|
20
|
-
category: ( localize2(
|
|
19
|
+
title: ( localize2(4619, "Manage Accounts")),
|
|
20
|
+
category: ( localize2(4620, "Accounts")),
|
|
21
21
|
f1: true
|
|
22
22
|
});
|
|
23
23
|
}
|
|
@@ -41,11 +41,11 @@ let ManageAccountsActionImpl = class ManageAccountsActionImpl {
|
|
|
41
41
|
this.productService = productService;
|
|
42
42
|
}
|
|
43
43
|
async run() {
|
|
44
|
-
const placeHolder = ( localize(
|
|
44
|
+
const placeHolder = ( localize(4621, "Select an account to manage"));
|
|
45
45
|
const accounts = await this.listAccounts();
|
|
46
46
|
if (!accounts.length) {
|
|
47
47
|
await this.quickInputService.pick([{
|
|
48
|
-
label: ( localize(
|
|
48
|
+
label: ( localize(4622, "There are no active accounts."))
|
|
49
49
|
}], {
|
|
50
50
|
placeHolder
|
|
51
51
|
});
|
|
@@ -98,11 +98,11 @@ let ManageAccountsActionImpl = class ManageAccountsActionImpl {
|
|
|
98
98
|
} = account;
|
|
99
99
|
const store = ( new DisposableStore());
|
|
100
100
|
const quickPick = store.add(this.quickInputService.createQuickPick());
|
|
101
|
-
quickPick.title = ( localize(
|
|
102
|
-
quickPick.placeholder = ( localize(
|
|
101
|
+
quickPick.title = ( localize(4623, "Manage '{0}'", accountLabel));
|
|
102
|
+
quickPick.placeholder = ( localize(4624, "Select an action"));
|
|
103
103
|
quickPick.buttons = [this.quickInputService.backButton];
|
|
104
104
|
const items = [{
|
|
105
|
-
label: ( localize(
|
|
105
|
+
label: ( localize(4625, "Manage Trusted Extensions")),
|
|
106
106
|
action: () => this.commandService.executeCommand("_manageTrustedExtensionsForAccount", {
|
|
107
107
|
providerId,
|
|
108
108
|
accountLabel
|
|
@@ -110,7 +110,7 @@ let ManageAccountsActionImpl = class ManageAccountsActionImpl {
|
|
|
110
110
|
}];
|
|
111
111
|
if (canUseMcp) {
|
|
112
112
|
items.push({
|
|
113
|
-
label: ( localize(
|
|
113
|
+
label: ( localize(4626, "Manage Trusted MCP Servers")),
|
|
114
114
|
action: () => this.commandService.executeCommand("_manageTrustedMCPServersForAccount", {
|
|
115
115
|
providerId,
|
|
116
116
|
accountLabel
|
|
@@ -119,7 +119,7 @@ let ManageAccountsActionImpl = class ManageAccountsActionImpl {
|
|
|
119
119
|
}
|
|
120
120
|
if (await canSignOut()) {
|
|
121
121
|
items.push({
|
|
122
|
-
label: ( localize(
|
|
122
|
+
label: ( localize(4627, "Sign Out")),
|
|
123
123
|
action: () => this.commandService.executeCommand("_signOutOfAccount", {
|
|
124
124
|
providerId,
|
|
125
125
|
accountLabel
|
|
@@ -13,8 +13,8 @@ class RemoveDynamicAuthenticationProvidersAction extends Action2 {
|
|
|
13
13
|
constructor() {
|
|
14
14
|
super({
|
|
15
15
|
id: RemoveDynamicAuthenticationProvidersAction.ID,
|
|
16
|
-
title: ( localize2(
|
|
17
|
-
category: ( localize2(
|
|
16
|
+
title: ( localize2(4628, "Remove Dynamic Authentication Providers")),
|
|
17
|
+
category: ( localize2(4629, "Authentication")),
|
|
18
18
|
f1: true
|
|
19
19
|
});
|
|
20
20
|
}
|
|
@@ -25,16 +25,16 @@ class RemoveDynamicAuthenticationProvidersAction extends Action2 {
|
|
|
25
25
|
const dialogService = accessor.get(IDialogService);
|
|
26
26
|
const interactedProviders = dynamicAuthStorageService.getInteractedProviders();
|
|
27
27
|
if (interactedProviders.length === 0) {
|
|
28
|
-
await dialogService.info(( localize(
|
|
28
|
+
await dialogService.info(( localize(4630, "No dynamic authentication providers")), ( localize(4631, "No dynamic authentication providers have been used yet.")));
|
|
29
29
|
return;
|
|
30
30
|
}
|
|
31
31
|
const items = ( interactedProviders.map(provider => ({
|
|
32
32
|
label: provider.label,
|
|
33
|
-
description: ( localize(
|
|
33
|
+
description: ( localize(4632, "Client ID: {0}", provider.clientId)),
|
|
34
34
|
provider
|
|
35
35
|
})));
|
|
36
36
|
const selected = await quickInputService.pick(items, {
|
|
37
|
-
placeHolder: ( localize(
|
|
37
|
+
placeHolder: ( localize(4633, "Select a dynamic authentication provider to remove")),
|
|
38
38
|
canPickMany: true
|
|
39
39
|
});
|
|
40
40
|
if (!selected || selected.length === 0) {
|
|
@@ -42,11 +42,11 @@ class RemoveDynamicAuthenticationProvidersAction extends Action2 {
|
|
|
42
42
|
}
|
|
43
43
|
const providerNames = ( selected.map(item => item.provider.label)).join(", ");
|
|
44
44
|
const message = selected.length === 1 ? ( localize(
|
|
45
|
-
|
|
45
|
+
4634,
|
|
46
46
|
"Are you sure you want to remove the dynamic authentication provider \"{0}\"?",
|
|
47
47
|
providerNames
|
|
48
48
|
)) : ( localize(
|
|
49
|
-
|
|
49
|
+
4635,
|
|
50
50
|
"Are you sure you want to remove {0} dynamic authentication providers: {1}?",
|
|
51
51
|
selected.length,
|
|
52
52
|
providerNames
|
|
@@ -54,10 +54,10 @@ class RemoveDynamicAuthenticationProvidersAction extends Action2 {
|
|
|
54
54
|
const result = await dialogService.confirm({
|
|
55
55
|
message,
|
|
56
56
|
detail: ( localize(
|
|
57
|
-
|
|
57
|
+
4636,
|
|
58
58
|
"This will remove all stored authentication data for the selected provider(s). You will need to re-authenticate if you use these providers again."
|
|
59
59
|
)),
|
|
60
|
-
primaryButton: ( localize(
|
|
60
|
+
primaryButton: ( localize(4637, "Remove")),
|
|
61
61
|
type: "warning"
|
|
62
62
|
});
|
|
63
63
|
if (!result.confirmed) {
|
|
@@ -19,8 +19,8 @@ class ManageTrustedExtensionsForAccountAction extends Action2 {
|
|
|
19
19
|
constructor() {
|
|
20
20
|
super({
|
|
21
21
|
id: "_manageTrustedExtensionsForAccount",
|
|
22
|
-
title: ( localize2(
|
|
23
|
-
category: ( localize2(
|
|
22
|
+
title: ( localize2(4638, "Manage Trusted Extensions For Account")),
|
|
23
|
+
category: ( localize2(4639, "Accounts")),
|
|
24
24
|
f1: true
|
|
25
25
|
});
|
|
26
26
|
}
|
|
@@ -47,11 +47,11 @@ let ManageTrustedExtensionsForAccountActionImpl = class ManageTrustedExtensionsF
|
|
|
47
47
|
this._commandService = _commandService;
|
|
48
48
|
this._extensionsWorkbenchService = _extensionsWorkbenchService;
|
|
49
49
|
this._viewDetailsButton = {
|
|
50
|
-
tooltip: ( localize(
|
|
50
|
+
tooltip: ( localize(4640, "View extension details")),
|
|
51
51
|
iconClass: ThemeIcon.asClassName(Codicon.info)
|
|
52
52
|
};
|
|
53
53
|
this._managePreferencesButton = {
|
|
54
|
-
tooltip: ( localize(
|
|
54
|
+
tooltip: ( localize(4641, "Manage account preferences for this extension")),
|
|
55
55
|
iconClass: ThemeIcon.asClassName(Codicon.settingsGear)
|
|
56
56
|
};
|
|
57
57
|
}
|
|
@@ -75,7 +75,7 @@ let ManageTrustedExtensionsForAccountActionImpl = class ManageTrustedExtensionsF
|
|
|
75
75
|
}
|
|
76
76
|
const accounts = await this._getAllAvailableAccounts();
|
|
77
77
|
const pick = await this._quickInputService.pick(accounts, {
|
|
78
|
-
placeHolder: ( localize(
|
|
78
|
+
placeHolder: ( localize(4642, "Pick an account to manage trusted extensions for")),
|
|
79
79
|
matchOnDescription: true
|
|
80
80
|
});
|
|
81
81
|
return pick ? this._authenticationQueryService.provider(pick.providerId).account(pick.label) : undefined;
|
|
@@ -117,7 +117,7 @@ let ManageTrustedExtensionsForAccountActionImpl = class ManageTrustedExtensionsF
|
|
|
117
117
|
};
|
|
118
118
|
}));
|
|
119
119
|
if (!filteredExtensions.length) {
|
|
120
|
-
this._dialogService.info(( localize(
|
|
120
|
+
this._dialogService.info(( localize(4643, "This account has not been used by any extensions.")));
|
|
121
121
|
return [];
|
|
122
122
|
}
|
|
123
123
|
const trustedExtensions = filteredExtensions.filter(e => e.trusted);
|
|
@@ -126,17 +126,17 @@ let ManageTrustedExtensionsForAccountActionImpl = class ManageTrustedExtensionsF
|
|
|
126
126
|
const _toQuickPickItem = this._toQuickPickItem.bind(this);
|
|
127
127
|
return [...( otherExtensions.sort(sortByLastUsed).map(_toQuickPickItem)), {
|
|
128
128
|
type: "separator",
|
|
129
|
-
label: ( localize(
|
|
129
|
+
label: ( localize(4644, "Trusted by Microsoft"))
|
|
130
130
|
}, ...( trustedExtensions.sort(sortByLastUsed).map(_toQuickPickItem))];
|
|
131
131
|
}
|
|
132
132
|
_toQuickPickItem(extension) {
|
|
133
133
|
const lastUsed = extension.lastUsed;
|
|
134
|
-
const description = lastUsed ? ( localize(
|
|
134
|
+
const description = lastUsed ? ( localize(4645, "Last used this account {0}", fromNow(lastUsed, true))) : ( localize(4646, "Has not used this account"));
|
|
135
135
|
let tooltip;
|
|
136
136
|
let disabled;
|
|
137
137
|
if (extension.trusted) {
|
|
138
138
|
tooltip = ( localize(
|
|
139
|
-
|
|
139
|
+
4647,
|
|
140
140
|
"This extension is trusted by Microsoft and\nalways has access to this account"
|
|
141
141
|
));
|
|
142
142
|
disabled = true;
|
|
@@ -158,10 +158,10 @@ let ManageTrustedExtensionsForAccountActionImpl = class ManageTrustedExtensionsF
|
|
|
158
158
|
}));
|
|
159
159
|
quickPick.canSelectMany = true;
|
|
160
160
|
quickPick.customButton = true;
|
|
161
|
-
quickPick.customLabel = ( localize(
|
|
161
|
+
quickPick.customLabel = ( localize(4648, "Cancel"));
|
|
162
162
|
quickPick.customButtonSecondary = true;
|
|
163
|
-
quickPick.title = ( localize(
|
|
164
|
-
quickPick.placeholder = ( localize(
|
|
163
|
+
quickPick.title = ( localize(4649, "Manage Trusted Extensions"));
|
|
164
|
+
quickPick.placeholder = ( localize(4650, "Choose which extensions can access this account"));
|
|
165
165
|
disposableStore.add(quickPick.onDidAccept(() => {
|
|
166
166
|
const updatedAllowedList = ( quickPick.items.filter(item => item.type !== "separator").map(i => i.extension));
|
|
167
167
|
const allowedExtensionsSet = ( new Set(( quickPick.selectedItems.map(i => i.extension))));
|
|
@@ -20,8 +20,8 @@ class ManageTrustedMcpServersForAccountAction extends Action2 {
|
|
|
20
20
|
constructor() {
|
|
21
21
|
super({
|
|
22
22
|
id: "_manageTrustedMCPServersForAccount",
|
|
23
|
-
title: ( localize2(
|
|
24
|
-
category: ( localize2(
|
|
23
|
+
title: ( localize2(4651, "Manage Trusted MCP Servers For Account")),
|
|
24
|
+
category: ( localize2(4652, "Accounts")),
|
|
25
25
|
f1: true,
|
|
26
26
|
precondition: ( ContextKeyExpr.and(( ChatContextKeys.Setup.hidden.negate()), ( ChatContextKeys.Setup.disabledInWorkspace.negate())))
|
|
27
27
|
});
|
|
@@ -67,7 +67,7 @@ let ManageTrustedMcpServersForAccountActionImpl = class ManageTrustedMcpServersF
|
|
|
67
67
|
}
|
|
68
68
|
const accounts = await this._getAllAvailableAccounts();
|
|
69
69
|
const pick = await this._quickInputService.pick(accounts, {
|
|
70
|
-
placeHolder: ( localize(
|
|
70
|
+
placeHolder: ( localize(4653, "Pick an account to manage trusted MCP servers for")),
|
|
71
71
|
matchOnDescription: true
|
|
72
72
|
});
|
|
73
73
|
return pick ? this._authenticationQueryService.provider(pick.providerId).account(pick.label) : undefined;
|
|
@@ -104,7 +104,7 @@ let ManageTrustedMcpServersForAccountActionImpl = class ManageTrustedMcpServersF
|
|
|
104
104
|
};
|
|
105
105
|
}));
|
|
106
106
|
if (!filteredMcpServers.length) {
|
|
107
|
-
this._dialogService.info(( localize(
|
|
107
|
+
this._dialogService.info(( localize(4654, "This account has not been used by any MCP servers.")));
|
|
108
108
|
return [];
|
|
109
109
|
}
|
|
110
110
|
const trustedServers = filteredMcpServers.filter(s => s.trusted);
|
|
@@ -112,17 +112,17 @@ let ManageTrustedMcpServersForAccountActionImpl = class ManageTrustedMcpServersF
|
|
|
112
112
|
const sortByLastUsed = (a, b) => (b.lastUsed || 0) - (a.lastUsed || 0);
|
|
113
113
|
return [...( otherServers.sort(sortByLastUsed).map(this._toQuickPickItem)), {
|
|
114
114
|
type: "separator",
|
|
115
|
-
label: ( localize(
|
|
115
|
+
label: ( localize(4655, "Trusted by Microsoft"))
|
|
116
116
|
}, ...( trustedServers.sort(sortByLastUsed).map(this._toQuickPickItem))];
|
|
117
117
|
}
|
|
118
118
|
_toQuickPickItem(mcpServer) {
|
|
119
119
|
const lastUsed = mcpServer.lastUsed;
|
|
120
|
-
const description = lastUsed ? ( localize(
|
|
120
|
+
const description = lastUsed ? ( localize(4656, "Last used this account {0}", fromNow(lastUsed, true))) : ( localize(4657, "Has not used this account"));
|
|
121
121
|
let tooltip;
|
|
122
122
|
let disabled;
|
|
123
123
|
if (mcpServer.trusted) {
|
|
124
124
|
tooltip = ( localize(
|
|
125
|
-
|
|
125
|
+
4658,
|
|
126
126
|
"This MCP server is trusted by Microsoft and\nalways has access to this account"
|
|
127
127
|
));
|
|
128
128
|
disabled = true;
|
|
@@ -134,7 +134,7 @@ let ManageTrustedMcpServersForAccountActionImpl = class ManageTrustedMcpServersF
|
|
|
134
134
|
tooltip,
|
|
135
135
|
disabled,
|
|
136
136
|
buttons: [{
|
|
137
|
-
tooltip: ( localize(
|
|
137
|
+
tooltip: ( localize(4659, "Manage account preferences for this MCP server")),
|
|
138
138
|
iconClass: ThemeIcon.asClassName(Codicon.settingsGear)
|
|
139
139
|
}],
|
|
140
140
|
picked: mcpServer.allowed === undefined || mcpServer.allowed
|
|
@@ -147,10 +147,10 @@ let ManageTrustedMcpServersForAccountActionImpl = class ManageTrustedMcpServersF
|
|
|
147
147
|
}));
|
|
148
148
|
quickPick.canSelectMany = true;
|
|
149
149
|
quickPick.customButton = true;
|
|
150
|
-
quickPick.customLabel = ( localize(
|
|
150
|
+
quickPick.customLabel = ( localize(4660, "Cancel"));
|
|
151
151
|
quickPick.customButtonSecondary = true;
|
|
152
|
-
quickPick.title = ( localize(
|
|
153
|
-
quickPick.placeholder = ( localize(
|
|
152
|
+
quickPick.title = ( localize(4661, "Manage Trusted MCP Servers"));
|
|
153
|
+
quickPick.placeholder = ( localize(4662, "Choose which MCP servers can access this account"));
|
|
154
154
|
disposableStore.add(quickPick.onDidAccept(() => {
|
|
155
155
|
quickPick.hide();
|
|
156
156
|
const allServers = ( quickPick.items.filter(item => item.type !== "separator").map(i => i.mcpServer));
|
package/vscode/src/vs/workbench/contrib/authentication/browser/actions/signOutOfAccountAction.js
CHANGED
|
@@ -11,7 +11,7 @@ class SignOutOfAccountAction extends Action2 {
|
|
|
11
11
|
constructor() {
|
|
12
12
|
super({
|
|
13
13
|
id: "_signOutOfAccount",
|
|
14
|
-
title: ( localize(
|
|
14
|
+
title: ( localize(4663, "Sign out of account")),
|
|
15
15
|
f1: false
|
|
16
16
|
});
|
|
17
17
|
}
|
|
@@ -39,12 +39,12 @@ class SignOutOfAccountAction extends Action2 {
|
|
|
39
39
|
} = await dialogService.confirm({
|
|
40
40
|
type: Severity.Info,
|
|
41
41
|
message: accountUsages.length ? ( localize(
|
|
42
|
-
|
|
42
|
+
4664,
|
|
43
43
|
"The account '{0}' has been used by: \n\n{1}\n\n Sign out from these extensions?",
|
|
44
44
|
accountLabel,
|
|
45
45
|
( accountUsages.map(usage => usage.extensionName)).join("\n")
|
|
46
|
-
)) : ( localize(
|
|
47
|
-
primaryButton: ( localize(
|
|
46
|
+
)) : ( localize(4665, "Sign out of '{0}'?", accountLabel)),
|
|
47
|
+
primaryButton: ( localize(4666, "&&Sign Out"))
|
|
48
48
|
});
|
|
49
49
|
if (confirmed) {
|
|
50
50
|
const removeSessionPromises = ( sessions.map(session => authenticationService.removeSession(providerId, session.id)));
|
package/vscode/src/vs/workbench/contrib/authentication/browser/authentication.contribution.js
CHANGED
|
@@ -41,7 +41,7 @@ class AuthenticationDataRenderer extends Disposable {
|
|
|
41
41
|
dispose: () => {}
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
|
-
const headers = [( localize(
|
|
44
|
+
const headers = [( localize(4667, "Label")), ( localize(4668, "ID")), ( localize(4669, "MCP Authorization Servers"))];
|
|
45
45
|
const rows = ( authentication.sort((a, b) => a.label.localeCompare(b.label)).map(auth => {
|
|
46
46
|
return [auth.label, auth.id, (auth.authorizationServerGlobs ?? []).join(",\n")];
|
|
47
47
|
}));
|
|
@@ -56,7 +56,7 @@ class AuthenticationDataRenderer extends Disposable {
|
|
|
56
56
|
}
|
|
57
57
|
const extensionFeature = ( Registry.as(Extensions.ExtensionFeaturesRegistry)).registerExtensionFeature({
|
|
58
58
|
id: "authentication",
|
|
59
|
-
label: ( localize(
|
|
59
|
+
label: ( localize(4670, "Authentication")),
|
|
60
60
|
access: {
|
|
61
61
|
canToggle: false
|
|
62
62
|
},
|
package/vscode/src/vs/workbench/services/authentication/browser/authenticationExtensionsService.js
CHANGED
|
@@ -121,7 +121,7 @@ let AuthenticationExtensionsService = class AuthenticationExtensionsService exte
|
|
|
121
121
|
numberOfRequests += ( Object.keys(accessRequest)).length;
|
|
122
122
|
});
|
|
123
123
|
if (numberOfRequests > 0) {
|
|
124
|
-
const badge = ( new NumberBadge(numberOfRequests, () => ( localize(
|
|
124
|
+
const badge = ( new NumberBadge(numberOfRequests, () => ( localize(16319, "Sign in requested"))));
|
|
125
125
|
this._accountBadgeDisposable.value = this.activityService.showAccountsActivity({
|
|
126
126
|
badge
|
|
127
127
|
});
|
|
@@ -201,17 +201,17 @@ let AuthenticationExtensionsService = class AuthenticationExtensionsService exte
|
|
|
201
201
|
} = await this.dialogService.prompt({
|
|
202
202
|
type: Severity.Info,
|
|
203
203
|
message: ( localize(
|
|
204
|
-
|
|
204
|
+
16320,
|
|
205
205
|
"The extension '{0}' wants to access the {1} account '{2}'.",
|
|
206
206
|
extensionName,
|
|
207
207
|
provider.label,
|
|
208
208
|
accountName
|
|
209
209
|
)),
|
|
210
210
|
buttons: [{
|
|
211
|
-
label: ( localize(
|
|
211
|
+
label: ( localize(16321, "&&Allow")),
|
|
212
212
|
run: () => SessionPromptChoice.Allow
|
|
213
213
|
}, {
|
|
214
|
-
label: ( localize(
|
|
214
|
+
label: ( localize(16322, "&&Deny")),
|
|
215
215
|
run: () => SessionPromptChoice.Deny
|
|
216
216
|
}],
|
|
217
217
|
cancelButton: {
|
|
@@ -259,17 +259,17 @@ let AuthenticationExtensionsService = class AuthenticationExtensionsService exte
|
|
|
259
259
|
}
|
|
260
260
|
});
|
|
261
261
|
items.push({
|
|
262
|
-
label: ( localize(
|
|
262
|
+
label: ( localize(16323, "Sign in to another account"))
|
|
263
263
|
});
|
|
264
264
|
quickPick.items = items;
|
|
265
265
|
quickPick.title = ( localize(
|
|
266
|
-
|
|
266
|
+
16324,
|
|
267
267
|
"The extension '{0}' wants to access a {1} account",
|
|
268
268
|
extensionName,
|
|
269
269
|
this._authenticationService.getProvider(providerId).label
|
|
270
270
|
));
|
|
271
271
|
quickPick.placeholder = ( localize(
|
|
272
|
-
|
|
272
|
+
16325,
|
|
273
273
|
"Select an account for '{0}' to use or Esc to cancel",
|
|
274
274
|
extensionName
|
|
275
275
|
));
|
|
@@ -361,7 +361,7 @@ let AuthenticationExtensionsService = class AuthenticationExtensionsService exte
|
|
|
361
361
|
group: "3_accessRequests",
|
|
362
362
|
command: {
|
|
363
363
|
id: `${providerId}${extensionId}Access`,
|
|
364
|
-
title: ( localize(
|
|
364
|
+
title: ( localize(16326, "Grant access to {0} for {1}... (1)", provider.label, extensionName))
|
|
365
365
|
}
|
|
366
366
|
}));
|
|
367
367
|
const accessCommand = CommandsRegistry.registerCommand({
|
|
@@ -405,7 +405,7 @@ let AuthenticationExtensionsService = class AuthenticationExtensionsService exte
|
|
|
405
405
|
group: "2_signInRequests",
|
|
406
406
|
command: {
|
|
407
407
|
id: commandId,
|
|
408
|
-
title: ( localize(
|
|
408
|
+
title: ( localize(16327, "Sign in with {0} to use {1} (1)", provider.label, extensionName))
|
|
409
409
|
}
|
|
410
410
|
}));
|
|
411
411
|
const signInCommand = CommandsRegistry.registerCommand({
|