@codingame/monaco-vscode-authentication-service-override 23.0.4 → 23.1.1
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 +5 -5
- 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 +13 -13
- package/vscode/src/vs/workbench/contrib/authentication/browser/actions/manageTrustedMcpServersForAccountAction.js +12 -12
- package/vscode/src/vs/workbench/contrib/authentication/browser/actions/signOutOfAccountAction.js +4 -4
- package/vscode/src/vs/workbench/contrib/authentication/browser/authentication.contribution.js +4 -4
- 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": "23.
|
|
3
|
+
"version": "23.1.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - authentication service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-3b5a5cd1-d4ff-500a-b609-57e0cd4afa0a-common": "23.
|
|
19
|
-
"@codingame/monaco-vscode-4bf376c2-03c7-58cb-8303-c67aeefa3d3d-common": "23.
|
|
20
|
-
"@codingame/monaco-vscode-api": "23.
|
|
21
|
-
"@codingame/monaco-vscode-f22e7e55-aee8-5b52-a6bc-950efd9f5890-common": "23.
|
|
18
|
+
"@codingame/monaco-vscode-3b5a5cd1-d4ff-500a-b609-57e0cd4afa0a-common": "23.1.1",
|
|
19
|
+
"@codingame/monaco-vscode-4bf376c2-03c7-58cb-8303-c67aeefa3d3d-common": "23.1.1",
|
|
20
|
+
"@codingame/monaco-vscode-api": "23.1.1",
|
|
21
|
+
"@codingame/monaco-vscode-f22e7e55-aee8-5b52-a6bc-950efd9f5890-common": "23.1.1"
|
|
22
22
|
},
|
|
23
23
|
"main": "index.js",
|
|
24
24
|
"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(4386, "Manage Extension Account Preferences...")),
|
|
20
|
+
category: ( localize2(4387, "Accounts")),
|
|
21
21
|
f1: true,
|
|
22
22
|
menu: [{
|
|
23
23
|
id: MenuId.AccountsContext,
|
|
@@ -47,8 +47,8 @@ let ManageAccountPreferenceForExtensionActionImpl = class ManageAccountPreferenc
|
|
|
47
47
|
label: ext.displayName ?? ext.name,
|
|
48
48
|
id: ext.identifier.value
|
|
49
49
|
}))), {
|
|
50
|
-
placeHolder: ( localize(
|
|
51
|
-
title: ( localize(
|
|
50
|
+
placeHolder: ( localize(4388, "Select an extension to manage account preferences for")),
|
|
51
|
+
title: ( localize(4389, "Manage Extension Account Preferences"))
|
|
52
52
|
});
|
|
53
53
|
extensionId = result?.id;
|
|
54
54
|
}
|
|
@@ -63,7 +63,7 @@ let ManageAccountPreferenceForExtensionActionImpl = class ManageAccountPreferenc
|
|
|
63
63
|
const extensionQuery = this._authenticationQueryService.extension(extensionId);
|
|
64
64
|
const providersWithAccess = await extensionQuery.getProvidersWithAccess();
|
|
65
65
|
if (!providersWithAccess.length) {
|
|
66
|
-
await this._dialogService.info(( localize(
|
|
66
|
+
await this._dialogService.info(( localize(4390, "This extension has not used any accounts yet.")));
|
|
67
67
|
return;
|
|
68
68
|
}
|
|
69
69
|
providerId = providersWithAccess[0];
|
|
@@ -73,10 +73,10 @@ let ManageAccountPreferenceForExtensionActionImpl = class ManageAccountPreferenc
|
|
|
73
73
|
id: providerId,
|
|
74
74
|
}))), {
|
|
75
75
|
placeHolder: ( localize(
|
|
76
|
-
|
|
76
|
+
4391,
|
|
77
77
|
"Select an authentication provider to manage account preferences for"
|
|
78
78
|
)),
|
|
79
|
-
title: ( localize(
|
|
79
|
+
title: ( localize(4389, "Manage Extension Account Preferences"))
|
|
80
80
|
});
|
|
81
81
|
if (!result) {
|
|
82
82
|
return;
|
|
@@ -97,7 +97,7 @@ let ManageAccountPreferenceForExtensionActionImpl = class ManageAccountPreferenc
|
|
|
97
97
|
items.push({
|
|
98
98
|
providerId,
|
|
99
99
|
scopes: lastUsedScopes,
|
|
100
|
-
label: ( localize(
|
|
100
|
+
label: ( localize(4392, "Use a new account...")),
|
|
101
101
|
});
|
|
102
102
|
}
|
|
103
103
|
}
|
|
@@ -116,12 +116,12 @@ let ManageAccountPreferenceForExtensionActionImpl = class ManageAccountPreferenc
|
|
|
116
116
|
disposableStore.dispose();
|
|
117
117
|
}));
|
|
118
118
|
picker.placeholder = ( localize(
|
|
119
|
-
|
|
119
|
+
4393,
|
|
120
120
|
"Manage '{0}' account preferences for {1}...",
|
|
121
121
|
extensionLabel,
|
|
122
122
|
providerLabel
|
|
123
123
|
));
|
|
124
|
-
picker.title = ( localize(
|
|
124
|
+
picker.title = ( localize(4394, "'{0}' Account Preferences For This Workspace", extensionLabel));
|
|
125
125
|
picker.sortByLabel = false;
|
|
126
126
|
disposableStore.add(picker.onDidAccept(async () => {
|
|
127
127
|
picker.hide();
|
|
@@ -135,7 +135,7 @@ let ManageAccountPreferenceForExtensionActionImpl = class ManageAccountPreferenc
|
|
|
135
135
|
label: a.label,
|
|
136
136
|
account: a,
|
|
137
137
|
providerId,
|
|
138
|
-
description: ( localize(
|
|
138
|
+
description: ( localize(4395, "Current account")),
|
|
139
139
|
picked: true
|
|
140
140
|
}
|
|
141
141
|
: {
|
|
@@ -145,7 +145,7 @@ let ManageAccountPreferenceForExtensionActionImpl = class ManageAccountPreferenc
|
|
|
145
145
|
}));
|
|
146
146
|
}
|
|
147
147
|
_handleNoAccounts(picker) {
|
|
148
|
-
picker.validationMessage = ( localize(
|
|
148
|
+
picker.validationMessage = ( localize(4396, "No accounts are currently used by this extension."));
|
|
149
149
|
picker.buttons = [this._quickInputService.backButton];
|
|
150
150
|
picker.show();
|
|
151
151
|
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(4397, "Manage MCP Server Account Preferences")),
|
|
20
|
+
category: ( localize2(4398, "Accounts")),
|
|
21
21
|
f1: false
|
|
22
22
|
});
|
|
23
23
|
}
|
|
@@ -46,7 +46,7 @@ let ManageAccountPreferenceForMcpServerActionImpl = class ManageAccountPreferenc
|
|
|
46
46
|
const mcpServerQuery = this._authenticationQueryService.mcpServer(mcpServerId);
|
|
47
47
|
const providersWithAccess = await mcpServerQuery.getProvidersWithAccess();
|
|
48
48
|
if (!providersWithAccess.length) {
|
|
49
|
-
await this._dialogService.info(( localize(
|
|
49
|
+
await this._dialogService.info(( localize(4399, "This MCP server has not used any accounts yet.")));
|
|
50
50
|
return;
|
|
51
51
|
}
|
|
52
52
|
providerId = providersWithAccess[0];
|
|
@@ -56,10 +56,10 @@ let ManageAccountPreferenceForMcpServerActionImpl = class ManageAccountPreferenc
|
|
|
56
56
|
id: providerId,
|
|
57
57
|
}))), {
|
|
58
58
|
placeHolder: ( localize(
|
|
59
|
-
|
|
59
|
+
4400,
|
|
60
60
|
"Select an authentication provider to manage account preferences for"
|
|
61
61
|
)),
|
|
62
|
-
title: ( localize(
|
|
62
|
+
title: ( localize(4401, "Manage MCP Server Account Preferences"))
|
|
63
63
|
});
|
|
64
64
|
if (!result) {
|
|
65
65
|
return;
|
|
@@ -80,7 +80,7 @@ let ManageAccountPreferenceForMcpServerActionImpl = class ManageAccountPreferenc
|
|
|
80
80
|
items.push({
|
|
81
81
|
providerId: providerId,
|
|
82
82
|
scopes: lastUsedScopes,
|
|
83
|
-
label: ( localize(
|
|
83
|
+
label: ( localize(4402, "Use a new account...")),
|
|
84
84
|
});
|
|
85
85
|
}
|
|
86
86
|
}
|
|
@@ -99,12 +99,12 @@ let ManageAccountPreferenceForMcpServerActionImpl = class ManageAccountPreferenc
|
|
|
99
99
|
disposableStore.dispose();
|
|
100
100
|
}));
|
|
101
101
|
picker.placeholder = ( localize(
|
|
102
|
-
|
|
102
|
+
4403,
|
|
103
103
|
"Manage '{0}' account preferences for {1}...",
|
|
104
104
|
mcpServerLabel,
|
|
105
105
|
providerLabel
|
|
106
106
|
));
|
|
107
|
-
picker.title = ( localize(
|
|
107
|
+
picker.title = ( localize(4404, "'{0}' Account Preferences For This Workspace", mcpServerLabel));
|
|
108
108
|
picker.sortByLabel = false;
|
|
109
109
|
disposableStore.add(picker.onDidAccept(async () => {
|
|
110
110
|
picker.hide();
|
|
@@ -118,7 +118,7 @@ let ManageAccountPreferenceForMcpServerActionImpl = class ManageAccountPreferenc
|
|
|
118
118
|
label: a.label,
|
|
119
119
|
account: a,
|
|
120
120
|
providerId,
|
|
121
|
-
description: ( localize(
|
|
121
|
+
description: ( localize(4405, "Current account")),
|
|
122
122
|
picked: true
|
|
123
123
|
}
|
|
124
124
|
: {
|
|
@@ -128,7 +128,7 @@ let ManageAccountPreferenceForMcpServerActionImpl = class ManageAccountPreferenc
|
|
|
128
128
|
}));
|
|
129
129
|
}
|
|
130
130
|
_handleNoAccounts(picker) {
|
|
131
|
-
picker.validationMessage = ( localize(
|
|
131
|
+
picker.validationMessage = ( localize(4406, "No accounts are currently used by this MCP server."));
|
|
132
132
|
picker.buttons = [this._quickInputService.backButton];
|
|
133
133
|
picker.show();
|
|
134
134
|
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(4407, "Manage Accounts")),
|
|
20
|
+
category: ( localize2(4408, "Accounts")),
|
|
21
21
|
f1: true
|
|
22
22
|
});
|
|
23
23
|
}
|
|
@@ -35,10 +35,10 @@ let ManageAccountsActionImpl = class ManageAccountsActionImpl {
|
|
|
35
35
|
this.productService = productService;
|
|
36
36
|
}
|
|
37
37
|
async run() {
|
|
38
|
-
const placeHolder = ( localize(
|
|
38
|
+
const placeHolder = ( localize(4409, "Select an account to manage"));
|
|
39
39
|
const accounts = await this.listAccounts();
|
|
40
40
|
if (!accounts.length) {
|
|
41
|
-
await this.quickInputService.pick([{ label: ( localize(
|
|
41
|
+
await this.quickInputService.pick([{ label: ( localize(4410, "There are no active accounts.")) }], { placeHolder });
|
|
42
42
|
return;
|
|
43
43
|
}
|
|
44
44
|
const account = await this.quickInputService.pick(accounts, { placeHolder, matchOnDescription: true });
|
|
@@ -77,21 +77,21 @@ let ManageAccountsActionImpl = class ManageAccountsActionImpl {
|
|
|
77
77
|
const { providerId, label: accountLabel, canUseMcp, canSignOut } = account;
|
|
78
78
|
const store = ( new DisposableStore());
|
|
79
79
|
const quickPick = store.add(this.quickInputService.createQuickPick());
|
|
80
|
-
quickPick.title = ( localize(
|
|
81
|
-
quickPick.placeholder = ( localize(
|
|
80
|
+
quickPick.title = ( localize(4411, "Manage '{0}'", accountLabel));
|
|
81
|
+
quickPick.placeholder = ( localize(4412, "Select an action"));
|
|
82
82
|
const items = [{
|
|
83
|
-
label: ( localize(
|
|
83
|
+
label: ( localize(4413, "Manage Trusted Extensions")),
|
|
84
84
|
action: () => this.commandService.executeCommand('_manageTrustedExtensionsForAccount', { providerId, accountLabel })
|
|
85
85
|
}];
|
|
86
86
|
if (canUseMcp) {
|
|
87
87
|
items.push({
|
|
88
|
-
label: ( localize(
|
|
88
|
+
label: ( localize(4414, "Manage Trusted MCP Servers")),
|
|
89
89
|
action: () => this.commandService.executeCommand('_manageTrustedMCPServersForAccount', { providerId, accountLabel })
|
|
90
90
|
});
|
|
91
91
|
}
|
|
92
92
|
if (await canSignOut()) {
|
|
93
93
|
items.push({
|
|
94
|
-
label: ( localize(
|
|
94
|
+
label: ( localize(4415, "Sign Out")),
|
|
95
95
|
action: () => this.commandService.executeCommand('_signOutOfAccount', { providerId, accountLabel })
|
|
96
96
|
});
|
|
97
97
|
}
|
|
@@ -11,8 +11,8 @@ class RemoveDynamicAuthenticationProvidersAction extends Action2 {
|
|
|
11
11
|
constructor() {
|
|
12
12
|
super({
|
|
13
13
|
id: RemoveDynamicAuthenticationProvidersAction.ID,
|
|
14
|
-
title: ( localize2(
|
|
15
|
-
category: ( localize2(
|
|
14
|
+
title: ( localize2(4416, 'Remove Dynamic Authentication Providers')),
|
|
15
|
+
category: ( localize2(4417, 'Authentication')),
|
|
16
16
|
f1: true
|
|
17
17
|
});
|
|
18
18
|
}
|
|
@@ -23,16 +23,16 @@ class RemoveDynamicAuthenticationProvidersAction extends Action2 {
|
|
|
23
23
|
const dialogService = accessor.get(IDialogService);
|
|
24
24
|
const interactedProviders = dynamicAuthStorageService.getInteractedProviders();
|
|
25
25
|
if (interactedProviders.length === 0) {
|
|
26
|
-
await dialogService.info(( localize(
|
|
26
|
+
await dialogService.info(( localize(4418, 'No dynamic authentication providers')), ( localize(4419, 'No dynamic authentication providers have been used yet.')));
|
|
27
27
|
return;
|
|
28
28
|
}
|
|
29
29
|
const items = ( interactedProviders.map(provider => ({
|
|
30
30
|
label: provider.label,
|
|
31
|
-
description: ( localize(
|
|
31
|
+
description: ( localize(4420, 'Client ID: {0}', provider.clientId)),
|
|
32
32
|
provider
|
|
33
33
|
})));
|
|
34
34
|
const selected = await quickInputService.pick(items, {
|
|
35
|
-
placeHolder: ( localize(
|
|
35
|
+
placeHolder: ( localize(4421, 'Select a dynamic authentication provider to remove')),
|
|
36
36
|
canPickMany: true
|
|
37
37
|
});
|
|
38
38
|
if (!selected || selected.length === 0) {
|
|
@@ -41,12 +41,12 @@ class RemoveDynamicAuthenticationProvidersAction extends Action2 {
|
|
|
41
41
|
const providerNames = ( selected.map(item => item.provider.label)).join(', ');
|
|
42
42
|
const message = selected.length === 1
|
|
43
43
|
? ( localize(
|
|
44
|
-
|
|
44
|
+
4422,
|
|
45
45
|
'Are you sure you want to remove the dynamic authentication provider "{0}"?',
|
|
46
46
|
providerNames
|
|
47
47
|
))
|
|
48
48
|
: ( localize(
|
|
49
|
-
|
|
49
|
+
4423,
|
|
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
|
+
4424,
|
|
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(4425, '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(4426, "Manage Trusted Extensions For Account")),
|
|
23
|
+
category: ( localize2(4427, "Accounts")),
|
|
24
24
|
f1: true
|
|
25
25
|
});
|
|
26
26
|
}
|
|
@@ -39,11 +39,11 @@ let ManageTrustedExtensionsForAccountActionImpl = class ManageTrustedExtensionsF
|
|
|
39
39
|
this._commandService = _commandService;
|
|
40
40
|
this._extensionsWorkbenchService = _extensionsWorkbenchService;
|
|
41
41
|
this._viewDetailsButton = {
|
|
42
|
-
tooltip: ( localize(
|
|
42
|
+
tooltip: ( localize(4428, "View extension details")),
|
|
43
43
|
iconClass: ThemeIcon.asClassName(Codicon.info),
|
|
44
44
|
};
|
|
45
45
|
this._managePreferencesButton = {
|
|
46
|
-
tooltip: ( localize(
|
|
46
|
+
tooltip: ( localize(4429, "Manage account preferences for this extension")),
|
|
47
47
|
iconClass: ThemeIcon.asClassName(Codicon.settingsGear),
|
|
48
48
|
};
|
|
49
49
|
}
|
|
@@ -67,7 +67,7 @@ let ManageTrustedExtensionsForAccountActionImpl = class ManageTrustedExtensionsF
|
|
|
67
67
|
}
|
|
68
68
|
const accounts = await this._getAllAvailableAccounts();
|
|
69
69
|
const pick = await this._quickInputService.pick(accounts, {
|
|
70
|
-
placeHolder: ( localize(
|
|
70
|
+
placeHolder: ( localize(4430, "Pick an account to manage trusted extensions for")),
|
|
71
71
|
matchOnDescription: true,
|
|
72
72
|
});
|
|
73
73
|
return pick ? this._authenticationQueryService.provider(pick.providerId).account(pick.label) : undefined;
|
|
@@ -111,7 +111,7 @@ let ManageTrustedExtensionsForAccountActionImpl = class ManageTrustedExtensionsF
|
|
|
111
111
|
};
|
|
112
112
|
}));
|
|
113
113
|
if (!filteredExtensions.length) {
|
|
114
|
-
this._dialogService.info(( localize(
|
|
114
|
+
this._dialogService.info(( localize(4431, "This account has not been used by any extensions.")));
|
|
115
115
|
return [];
|
|
116
116
|
}
|
|
117
117
|
const trustedExtensions = filteredExtensions.filter(e => e.trusted);
|
|
@@ -120,20 +120,20 @@ let ManageTrustedExtensionsForAccountActionImpl = class ManageTrustedExtensionsF
|
|
|
120
120
|
const _toQuickPickItem = this._toQuickPickItem.bind(this);
|
|
121
121
|
return [
|
|
122
122
|
...( otherExtensions.sort(sortByLastUsed).map(_toQuickPickItem)),
|
|
123
|
-
{ type: 'separator', label: ( localize(
|
|
123
|
+
{ type: 'separator', label: ( localize(4432, "Trusted by Microsoft")) },
|
|
124
124
|
...( trustedExtensions.sort(sortByLastUsed).map(_toQuickPickItem))
|
|
125
125
|
];
|
|
126
126
|
}
|
|
127
127
|
_toQuickPickItem(extension) {
|
|
128
128
|
const lastUsed = extension.lastUsed;
|
|
129
129
|
const description = lastUsed
|
|
130
|
-
? ( localize(
|
|
131
|
-
: ( localize(
|
|
130
|
+
? ( localize(4433, "Last used this account {0}", fromNow(lastUsed, true)))
|
|
131
|
+
: ( localize(4434, "Has not used this account"));
|
|
132
132
|
let tooltip;
|
|
133
133
|
let disabled;
|
|
134
134
|
if (extension.trusted) {
|
|
135
135
|
tooltip = ( localize(
|
|
136
|
-
|
|
136
|
+
4435,
|
|
137
137
|
"This extension is trusted by Microsoft and\nalways has access to this account"
|
|
138
138
|
));
|
|
139
139
|
disabled = true;
|
|
@@ -153,9 +153,9 @@ let ManageTrustedExtensionsForAccountActionImpl = class ManageTrustedExtensionsF
|
|
|
153
153
|
const quickPick = disposableStore.add(this._quickInputService.createQuickPick({ useSeparators: true }));
|
|
154
154
|
quickPick.canSelectMany = true;
|
|
155
155
|
quickPick.customButton = true;
|
|
156
|
-
quickPick.customLabel = ( localize(
|
|
157
|
-
quickPick.title = ( localize(
|
|
158
|
-
quickPick.placeholder = ( localize(
|
|
156
|
+
quickPick.customLabel = ( localize(4436, 'Cancel'));
|
|
157
|
+
quickPick.title = ( localize(4437, "Manage Trusted Extensions"));
|
|
158
|
+
quickPick.placeholder = ( localize(4438, "Choose which extensions can access this account"));
|
|
159
159
|
disposableStore.add(quickPick.onDidAccept(() => {
|
|
160
160
|
const updatedAllowedList = ( quickPick.items
|
|
161
161
|
.filter((item) => item.type !== 'separator')
|
|
@@ -19,8 +19,8 @@ class ManageTrustedMcpServersForAccountAction extends Action2 {
|
|
|
19
19
|
constructor() {
|
|
20
20
|
super({
|
|
21
21
|
id: '_manageTrustedMCPServersForAccount',
|
|
22
|
-
title: ( localize2(
|
|
23
|
-
category: ( localize2(
|
|
22
|
+
title: ( localize2(4439, "Manage Trusted MCP Servers For Account")),
|
|
23
|
+
category: ( localize2(4440, "Accounts")),
|
|
24
24
|
f1: true,
|
|
25
25
|
precondition: ( ChatContextKeys.Setup.hidden.negate())
|
|
26
26
|
});
|
|
@@ -59,7 +59,7 @@ let ManageTrustedMcpServersForAccountActionImpl = class ManageTrustedMcpServersF
|
|
|
59
59
|
}
|
|
60
60
|
const accounts = await this._getAllAvailableAccounts();
|
|
61
61
|
const pick = await this._quickInputService.pick(accounts, {
|
|
62
|
-
placeHolder: ( localize(
|
|
62
|
+
placeHolder: ( localize(4441, "Pick an account to manage trusted MCP servers for")),
|
|
63
63
|
matchOnDescription: true,
|
|
64
64
|
});
|
|
65
65
|
return pick ? this._authenticationQueryService.provider(pick.providerId).account(pick.label) : undefined;
|
|
@@ -97,7 +97,7 @@ let ManageTrustedMcpServersForAccountActionImpl = class ManageTrustedMcpServersF
|
|
|
97
97
|
};
|
|
98
98
|
}));
|
|
99
99
|
if (!filteredMcpServers.length) {
|
|
100
|
-
this._dialogService.info(( localize(
|
|
100
|
+
this._dialogService.info(( localize(4442, "This account has not been used by any MCP servers.")));
|
|
101
101
|
return [];
|
|
102
102
|
}
|
|
103
103
|
const trustedServers = filteredMcpServers.filter(s => s.trusted);
|
|
@@ -105,20 +105,20 @@ let ManageTrustedMcpServersForAccountActionImpl = class ManageTrustedMcpServersF
|
|
|
105
105
|
const sortByLastUsed = (a, b) => (b.lastUsed || 0) - (a.lastUsed || 0);
|
|
106
106
|
return [
|
|
107
107
|
...( otherServers.sort(sortByLastUsed).map(this._toQuickPickItem)),
|
|
108
|
-
{ type: 'separator', label: ( localize(
|
|
108
|
+
{ type: 'separator', label: ( localize(4443, "Trusted by Microsoft")) },
|
|
109
109
|
...( trustedServers.sort(sortByLastUsed).map(this._toQuickPickItem))
|
|
110
110
|
];
|
|
111
111
|
}
|
|
112
112
|
_toQuickPickItem(mcpServer) {
|
|
113
113
|
const lastUsed = mcpServer.lastUsed;
|
|
114
114
|
const description = lastUsed
|
|
115
|
-
? ( localize(
|
|
116
|
-
: ( localize(
|
|
115
|
+
? ( localize(4444, "Last used this account {0}", fromNow(lastUsed, true)))
|
|
116
|
+
: ( localize(4445, "Has not used this account"));
|
|
117
117
|
let tooltip;
|
|
118
118
|
let disabled;
|
|
119
119
|
if (mcpServer.trusted) {
|
|
120
120
|
tooltip = ( localize(
|
|
121
|
-
|
|
121
|
+
4446,
|
|
122
122
|
"This MCP server is trusted by Microsoft and\nalways has access to this account"
|
|
123
123
|
));
|
|
124
124
|
disabled = true;
|
|
@@ -130,7 +130,7 @@ let ManageTrustedMcpServersForAccountActionImpl = class ManageTrustedMcpServersF
|
|
|
130
130
|
tooltip,
|
|
131
131
|
disabled,
|
|
132
132
|
buttons: [{
|
|
133
|
-
tooltip: ( localize(
|
|
133
|
+
tooltip: ( localize(4447, "Manage account preferences for this MCP server")),
|
|
134
134
|
iconClass: ThemeIcon.asClassName(Codicon.settingsGear),
|
|
135
135
|
}],
|
|
136
136
|
picked: mcpServer.allowed === undefined || mcpServer.allowed
|
|
@@ -141,9 +141,9 @@ let ManageTrustedMcpServersForAccountActionImpl = class ManageTrustedMcpServersF
|
|
|
141
141
|
const quickPick = disposableStore.add(this._quickInputService.createQuickPick({ useSeparators: true }));
|
|
142
142
|
quickPick.canSelectMany = true;
|
|
143
143
|
quickPick.customButton = true;
|
|
144
|
-
quickPick.customLabel = ( localize(
|
|
145
|
-
quickPick.title = ( localize(
|
|
146
|
-
quickPick.placeholder = ( localize(
|
|
144
|
+
quickPick.customLabel = ( localize(4448, 'Cancel'));
|
|
145
|
+
quickPick.title = ( localize(4449, "Manage Trusted MCP Servers"));
|
|
146
|
+
quickPick.placeholder = ( localize(4450, "Choose which MCP servers can access this account"));
|
|
147
147
|
disposableStore.add(quickPick.onDidAccept(() => {
|
|
148
148
|
quickPick.hide();
|
|
149
149
|
const allServers = ( quickPick.items
|
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(4451, "Sign out of account")),
|
|
15
15
|
f1: false
|
|
16
16
|
});
|
|
17
17
|
}
|
|
@@ -32,13 +32,13 @@ class SignOutOfAccountAction extends Action2 {
|
|
|
32
32
|
type: Severity.Info,
|
|
33
33
|
message: accountUsages.length
|
|
34
34
|
? ( localize(
|
|
35
|
-
|
|
35
|
+
4452,
|
|
36
36
|
"The account '{0}' has been used by: \n\n{1}\n\n Sign out from these extensions?",
|
|
37
37
|
accountLabel,
|
|
38
38
|
( accountUsages.map(usage => usage.extensionName)).join('\n')
|
|
39
39
|
))
|
|
40
|
-
: ( localize(
|
|
41
|
-
primaryButton: ( localize(
|
|
40
|
+
: ( localize(4453, "Sign out of '{0}'?", accountLabel)),
|
|
41
|
+
primaryButton: ( localize(4454, "&&Sign Out"))
|
|
42
42
|
});
|
|
43
43
|
if (confirmed) {
|
|
44
44
|
const removeSessionPromises = ( sessions.map(session => authenticationService.removeSession(providerId, session.id)));
|
package/vscode/src/vs/workbench/contrib/authentication/browser/authentication.contribution.js
CHANGED
|
@@ -36,9 +36,9 @@ class AuthenticationDataRenderer extends Disposable {
|
|
|
36
36
|
return { data: { headers: [], rows: [] }, dispose: () => { } };
|
|
37
37
|
}
|
|
38
38
|
const headers = [
|
|
39
|
-
( localize(
|
|
40
|
-
( localize(
|
|
41
|
-
( localize(
|
|
39
|
+
( localize(4455, "Label")),
|
|
40
|
+
( localize(4456, "ID")),
|
|
41
|
+
( localize(4457, "MCP Authorization Servers"))
|
|
42
42
|
];
|
|
43
43
|
const rows = ( authentication
|
|
44
44
|
.sort((a, b) => a.label.localeCompare(b.label))
|
|
@@ -60,7 +60,7 @@ class AuthenticationDataRenderer extends Disposable {
|
|
|
60
60
|
}
|
|
61
61
|
const extensionFeature = ( Registry.as(Extensions.ExtensionFeaturesRegistry)).registerExtensionFeature({
|
|
62
62
|
id: 'authentication',
|
|
63
|
-
label: ( localize(
|
|
63
|
+
label: ( localize(4458, "Authentication")),
|
|
64
64
|
access: {
|
|
65
65
|
canToggle: false
|
|
66
66
|
},
|
package/vscode/src/vs/workbench/services/authentication/browser/authenticationExtensionsService.js
CHANGED
|
@@ -113,7 +113,7 @@ let AuthenticationExtensionsService = class AuthenticationExtensionsService exte
|
|
|
113
113
|
numberOfRequests += ( Object.keys(accessRequest)).length;
|
|
114
114
|
});
|
|
115
115
|
if (numberOfRequests > 0) {
|
|
116
|
-
const badge = ( new NumberBadge(numberOfRequests, () => ( localize(
|
|
116
|
+
const badge = ( new NumberBadge(numberOfRequests, () => ( localize(13518, "Sign in requested"))));
|
|
117
117
|
this._accountBadgeDisposable.value = this.activityService.showAccountsActivity({ badge });
|
|
118
118
|
}
|
|
119
119
|
}
|
|
@@ -180,7 +180,7 @@ let AuthenticationExtensionsService = class AuthenticationExtensionsService exte
|
|
|
180
180
|
const { result } = await this.dialogService.prompt({
|
|
181
181
|
type: Severity.Info,
|
|
182
182
|
message: ( localize(
|
|
183
|
-
|
|
183
|
+
13519,
|
|
184
184
|
"The extension '{0}' wants to access the {1} account '{2}'.",
|
|
185
185
|
extensionName,
|
|
186
186
|
provider.label,
|
|
@@ -188,11 +188,11 @@ let AuthenticationExtensionsService = class AuthenticationExtensionsService exte
|
|
|
188
188
|
)),
|
|
189
189
|
buttons: [
|
|
190
190
|
{
|
|
191
|
-
label: ( localize(
|
|
191
|
+
label: ( localize(13520, "&&Allow")),
|
|
192
192
|
run: () => SessionPromptChoice.Allow
|
|
193
193
|
},
|
|
194
194
|
{
|
|
195
|
-
label: ( localize(
|
|
195
|
+
label: ( localize(13521, "&&Deny")),
|
|
196
196
|
run: () => SessionPromptChoice.Deny
|
|
197
197
|
}
|
|
198
198
|
],
|
|
@@ -228,16 +228,16 @@ let AuthenticationExtensionsService = class AuthenticationExtensionsService exte
|
|
|
228
228
|
items.push({ label: account.label, account });
|
|
229
229
|
}
|
|
230
230
|
});
|
|
231
|
-
items.push({ label: ( localize(
|
|
231
|
+
items.push({ label: ( localize(13522, "Sign in to another account")) });
|
|
232
232
|
quickPick.items = items;
|
|
233
233
|
quickPick.title = ( localize(
|
|
234
|
-
|
|
234
|
+
13523,
|
|
235
235
|
"The extension '{0}' wants to access a {1} account",
|
|
236
236
|
extensionName,
|
|
237
237
|
this._authenticationService.getProvider(providerId).label
|
|
238
238
|
));
|
|
239
239
|
quickPick.placeholder = ( localize(
|
|
240
|
-
|
|
240
|
+
13524,
|
|
241
241
|
"Select an account for '{0}' to use or Esc to cancel",
|
|
242
242
|
extensionName
|
|
243
243
|
));
|
|
@@ -309,7 +309,7 @@ let AuthenticationExtensionsService = class AuthenticationExtensionsService exte
|
|
|
309
309
|
group: '3_accessRequests',
|
|
310
310
|
command: {
|
|
311
311
|
id: `${providerId}${extensionId}Access`,
|
|
312
|
-
title: ( localize(
|
|
312
|
+
title: ( localize(13525, "Grant access to {0} for {1}... (1)", provider.label, extensionName))
|
|
313
313
|
}
|
|
314
314
|
}));
|
|
315
315
|
const accessCommand = CommandsRegistry.registerCommand({
|
|
@@ -355,7 +355,7 @@ let AuthenticationExtensionsService = class AuthenticationExtensionsService exte
|
|
|
355
355
|
group: '2_signInRequests',
|
|
356
356
|
command: {
|
|
357
357
|
id: commandId,
|
|
358
|
-
title: ( localize(
|
|
358
|
+
title: ( localize(13526, "Sign in with {0} to use {1} (1)", provider.label, extensionName))
|
|
359
359
|
}
|
|
360
360
|
}));
|
|
361
361
|
const signInCommand = CommandsRegistry.registerCommand({
|