@codingame/monaco-vscode-mcp-service-override 32.0.0 → 32.0.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/index.js +1 -0
- package/package.json +2 -2
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcp.contribution.js +3 -3
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcp.view.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcp.view.contribution.js +5 -0
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpAddContextContribution.js +2 -2
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpCommands.js +61 -61
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpElicitationService.js +25 -25
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpLanguageFeatures.js +22 -22
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpMigration.js +4 -4
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpResourceQuickAccess.js +8 -8
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerEditor.js +37 -37
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerIcons.js +5 -5
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerWidgets.js +98 -6
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServersView.d.ts +59 -0
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServersView.js +576 -0
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpWorkbenchService.js +10 -10
- package/vscode/src/vs/workbench/contrib/mcp/browser/media/mcpServersView.css +53 -0
- package/vscode/src/vs/workbench/contrib/mcp/common/discovery/extensionMcpDiscovery.js +4 -4
- package/vscode/src/vs/workbench/contrib/mcp/common/discovery/nativeMcpDiscoveryAbstract.js +1 -1
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpContextKeys.js +4 -4
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpLanguageModelToolContribution.js +6 -6
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpRegistry.js +13 -13
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpSamplingLog.js +1 -1
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpSamplingService.js +11 -11
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpSandboxService.js +3 -3
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpServerConnection.js +3 -3
- package/vscode/src/vs/workbench/services/authentication/browser/authenticationMcpService.js +9 -9
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
|
|
6
|
+
.mcp-welcome-container {
|
|
7
|
+
height: 100%;
|
|
8
|
+
width: 100%;
|
|
9
|
+
|
|
10
|
+
&.hide {
|
|
11
|
+
display: none;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.mcp-welcome-content {
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-direction: column;
|
|
17
|
+
align-items: center;
|
|
18
|
+
height: 100%;
|
|
19
|
+
padding: 0px 40px;
|
|
20
|
+
text-align: center;
|
|
21
|
+
margin: 20px auto;
|
|
22
|
+
|
|
23
|
+
.mcp-welcome-icon {
|
|
24
|
+
.codicon {
|
|
25
|
+
font-size: 48px;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.mcp-welcome-title {
|
|
30
|
+
font-size: 24px;
|
|
31
|
+
margin-top: 5px;
|
|
32
|
+
font-weight: 500;
|
|
33
|
+
line-height: normal;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.mcp-welcome-description {
|
|
37
|
+
max-width: 350px;
|
|
38
|
+
padding: 0 20px;
|
|
39
|
+
margin-top: 16px;
|
|
40
|
+
|
|
41
|
+
a {
|
|
42
|
+
color: var(--vscode-textLink-foreground);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.mcp-welcome-button-container {
|
|
47
|
+
margin-top: 16px;
|
|
48
|
+
max-width: 320px;
|
|
49
|
+
width: 100%;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -142,20 +142,20 @@ let ExtensionMcpDiscovery = ExtensionMcpDiscovery_1 = class ExtensionMcpDiscover
|
|
|
142
142
|
}
|
|
143
143
|
static _validate(user) {
|
|
144
144
|
if (!Array.isArray(user.value)) {
|
|
145
|
-
user.collector.error(( localize(
|
|
145
|
+
user.collector.error(( localize(11146, "Expected an array of MCP collections")));
|
|
146
146
|
return false;
|
|
147
147
|
}
|
|
148
148
|
for (const contribution of user.value) {
|
|
149
149
|
if (typeof contribution.id !== "string" || isFalsyOrWhitespace(contribution.id)) {
|
|
150
|
-
user.collector.error(( localize(
|
|
150
|
+
user.collector.error(( localize(11147, "Expected 'id' to be a non-empty string.")));
|
|
151
151
|
return false;
|
|
152
152
|
}
|
|
153
153
|
if (typeof contribution.label !== "string" || isFalsyOrWhitespace(contribution.label)) {
|
|
154
|
-
user.collector.error(( localize(
|
|
154
|
+
user.collector.error(( localize(11148, "Expected 'label' to be a non-empty string.")));
|
|
155
155
|
return false;
|
|
156
156
|
}
|
|
157
157
|
if (contribution.when !== undefined && (typeof contribution.when !== "string" || isFalsyOrWhitespace(contribution.when))) {
|
|
158
|
-
user.collector.error(( localize(
|
|
158
|
+
user.collector.error(( localize(11149, "Expected 'when' to be a non-empty string.")));
|
|
159
159
|
return false;
|
|
160
160
|
}
|
|
161
161
|
}
|
|
@@ -86,7 +86,7 @@ let NativeFilesystemMcpDiscovery = class NativeFilesystemMcpDiscovery extends Fi
|
|
|
86
86
|
this.suffix = "";
|
|
87
87
|
if (remoteAuthority) {
|
|
88
88
|
this.suffix = " " + ( localize(
|
|
89
|
-
|
|
89
|
+
11150,
|
|
90
90
|
" on {0}",
|
|
91
91
|
labelService.getHostLabel(Schemas.vscodeRemote, remoteAuthority)
|
|
92
92
|
));
|
|
@@ -14,19 +14,19 @@ var McpContextKeys;
|
|
|
14
14
|
(function(McpContextKeys) {
|
|
15
15
|
McpContextKeys.serverCount = ( new RawContextKey("mcp.serverCount", undefined, {
|
|
16
16
|
type: "number",
|
|
17
|
-
description: ( localize(
|
|
17
|
+
description: ( localize(11193, "Context key that has the number of registered MCP servers"))
|
|
18
18
|
}));
|
|
19
19
|
McpContextKeys.hasUnknownTools = ( new RawContextKey("mcp.hasUnknownTools", undefined, {
|
|
20
20
|
type: "boolean",
|
|
21
|
-
description: ( localize(
|
|
21
|
+
description: ( localize(11194, "Indicates whether there are MCP servers with unknown tools."))
|
|
22
22
|
}));
|
|
23
23
|
McpContextKeys.hasServersWithErrors = ( new RawContextKey("mcp.hasServersWithErrors", undefined, {
|
|
24
24
|
type: "boolean",
|
|
25
|
-
description: ( localize(
|
|
25
|
+
description: ( localize(11195, "Indicates whether there are any MCP servers with errors."))
|
|
26
26
|
}));
|
|
27
27
|
McpContextKeys.toolsCount = ( new RawContextKey("mcp.toolsCount", undefined, {
|
|
28
28
|
type: "number",
|
|
29
|
-
description: ( localize(
|
|
29
|
+
description: ( localize(11196, "Context key that has the number of registered MCP tools"))
|
|
30
30
|
}));
|
|
31
31
|
})(McpContextKeys || (McpContextKeys = {}));
|
|
32
32
|
let McpContextKeysController = class McpContextKeysController extends Disposable {
|
|
@@ -71,7 +71,7 @@ let McpLanguageModelToolContribution = class McpLanguageModelToolContribution ex
|
|
|
71
71
|
const toolSet = store.add(
|
|
72
72
|
this._toolsService.createToolSet(source, server.definition.id, referenceName, {
|
|
73
73
|
icon: Codicon.mcp,
|
|
74
|
-
description: ( localize(
|
|
74
|
+
description: ( localize(11197, "{0}: All Tools", server.definition.label))
|
|
75
75
|
})
|
|
76
76
|
);
|
|
77
77
|
return {
|
|
@@ -191,7 +191,7 @@ let McpToolImplementation = class McpToolImplementation {
|
|
|
191
191
|
});
|
|
192
192
|
const isSandboxedServer = sandboxEnabled === true;
|
|
193
193
|
const mcpToolWarning = ( localize(
|
|
194
|
-
|
|
194
|
+
11198,
|
|
195
195
|
"Note that MCP servers or malicious conversation content may attempt to misuse '{0}' through tools.",
|
|
196
196
|
this._productService.nameShort
|
|
197
197
|
));
|
|
@@ -200,7 +200,7 @@ let McpToolImplementation = class McpToolImplementation {
|
|
|
200
200
|
if (!isSandboxedServer) {
|
|
201
201
|
confirm = {};
|
|
202
202
|
if (!tool.definition.annotations?.readOnlyHint) {
|
|
203
|
-
confirm.title = ( new MarkdownString(( localize(
|
|
203
|
+
confirm.title = ( new MarkdownString(( localize(11199, "Run {0}", title))));
|
|
204
204
|
confirm.message = ( new MarkdownString(tool.definition.description, {
|
|
205
205
|
supportThemeIcons: true
|
|
206
206
|
}));
|
|
@@ -214,9 +214,9 @@ let McpToolImplementation = class McpToolImplementation {
|
|
|
214
214
|
const mcpUiEnabled = this._configurationService.getValue(mcpAppsEnabledConfig);
|
|
215
215
|
return {
|
|
216
216
|
confirmationMessages: confirm,
|
|
217
|
-
invocationMessage: ( new MarkdownString(( localize(
|
|
218
|
-
pastTenseMessage: ( new MarkdownString(( localize(
|
|
219
|
-
originMessage: ( localize(
|
|
217
|
+
invocationMessage: ( new MarkdownString(( localize(11200, "Running {0}", title)))),
|
|
218
|
+
pastTenseMessage: ( new MarkdownString(( localize(11201, "Ran {0} ", title)))),
|
|
219
|
+
originMessage: ( localize(11202, "{0} (MCP Server)", server.definition.label)),
|
|
220
220
|
toolSpecificData: {
|
|
221
221
|
kind: "input",
|
|
222
222
|
rawInput: context.parameters,
|
|
@@ -227,7 +227,7 @@ let McpRegistry = class McpRegistry extends Disposable {
|
|
|
227
227
|
if (errorOnUserInteraction) {
|
|
228
228
|
throw ( new UserInteractionRequiredError("workspaceTrust"));
|
|
229
229
|
} else if (!(await this._workspaceTrustRequestService.requestWorkspaceTrust({
|
|
230
|
-
message: ( localize(
|
|
230
|
+
message: ( localize(11203, "This MCP server definition is defined in your workspace files."))
|
|
231
231
|
}))) {
|
|
232
232
|
return false;
|
|
233
233
|
}
|
|
@@ -305,7 +305,7 @@ let McpRegistry = class McpRegistry extends Disposable {
|
|
|
305
305
|
const originURI = r.definition.presentation?.origin?.uri || r.collection.presentation?.origin;
|
|
306
306
|
let labelWithOrigin = originURI ? `[\`${r.definition.label}\`](${originURI})` : "`" + r.definition.label + "`";
|
|
307
307
|
if (r.collection.source instanceof ExtensionIdentifier) {
|
|
308
|
-
labelWithOrigin += ` (${( localize(
|
|
308
|
+
labelWithOrigin += ` (${( localize(11204, "from {0}", r.collection.source.value))})`;
|
|
309
309
|
}
|
|
310
310
|
return labelWithOrigin;
|
|
311
311
|
}
|
|
@@ -315,12 +315,12 @@ let McpRegistry = class McpRegistry extends Disposable {
|
|
|
315
315
|
const {
|
|
316
316
|
result
|
|
317
317
|
} = await this._dialogService.prompt({
|
|
318
|
-
message: ( localize(
|
|
318
|
+
message: ( localize(11205, "Trust and run MCP server {0}?", def.definition.label)),
|
|
319
319
|
custom: {
|
|
320
320
|
icon: Codicon.shield,
|
|
321
321
|
markdownDetails: [{
|
|
322
322
|
markdown: ( new MarkdownString(( localize(
|
|
323
|
-
|
|
323
|
+
11206,
|
|
324
324
|
"The MCP server {0} was updated. MCP servers may add context to your chat session and lead to unexpected behavior. Do you want to trust and run this server?",
|
|
325
325
|
labelFor(def)
|
|
326
326
|
)))),
|
|
@@ -333,10 +333,10 @@ let McpRegistry = class McpRegistry extends Disposable {
|
|
|
333
333
|
}]
|
|
334
334
|
},
|
|
335
335
|
buttons: [{
|
|
336
|
-
label: ( localize(
|
|
336
|
+
label: ( localize(11207, "Trust")),
|
|
337
337
|
run: () => true
|
|
338
338
|
}, {
|
|
339
|
-
label: ( localize(
|
|
339
|
+
label: ( localize(11208, "Do not trust")),
|
|
340
340
|
run: () => false
|
|
341
341
|
}]
|
|
342
342
|
});
|
|
@@ -346,12 +346,12 @@ let McpRegistry = class McpRegistry extends Disposable {
|
|
|
346
346
|
const {
|
|
347
347
|
result
|
|
348
348
|
} = await this._dialogService.prompt({
|
|
349
|
-
message: ( localize(
|
|
349
|
+
message: ( localize(11209, "Trust and run {0} MCP servers?", definitions.length)),
|
|
350
350
|
custom: {
|
|
351
351
|
icon: Codicon.shield,
|
|
352
352
|
markdownDetails: [{
|
|
353
353
|
markdown: ( new MarkdownString(( localize(
|
|
354
|
-
|
|
354
|
+
11210,
|
|
355
355
|
"Several updated MCP servers were discovered:\n\n{0}\n\n MCP servers may add context to your chat session and lead to unexpected behavior. Do you want to trust and run these server?",
|
|
356
356
|
list
|
|
357
357
|
)))),
|
|
@@ -364,13 +364,13 @@ let McpRegistry = class McpRegistry extends Disposable {
|
|
|
364
364
|
}]
|
|
365
365
|
},
|
|
366
366
|
buttons: [{
|
|
367
|
-
label: ( localize(
|
|
367
|
+
label: ( localize(11207, "Trust")),
|
|
368
368
|
run: () => "all"
|
|
369
369
|
}, {
|
|
370
|
-
label: ( localize(
|
|
370
|
+
label: ( localize(11211, "Pick Trusted")),
|
|
371
371
|
run: () => "pick"
|
|
372
372
|
}, {
|
|
373
|
-
label: ( localize(
|
|
373
|
+
label: ( localize(11208, "Do not trust")),
|
|
374
374
|
run: () => "none"
|
|
375
375
|
}]
|
|
376
376
|
});
|
|
@@ -533,14 +533,14 @@ let McpRegistry = class McpRegistry extends Disposable {
|
|
|
533
533
|
}
|
|
534
534
|
this._notificationService.notify({
|
|
535
535
|
severity: Severity.Error,
|
|
536
|
-
message: ( localize(
|
|
536
|
+
message: ( localize(11212, "Error starting {0}: {1}", definition.label, String(e))),
|
|
537
537
|
actions: {
|
|
538
538
|
primary: collection.presentation?.origin && [{
|
|
539
539
|
id: "mcp.launchError.openConfig",
|
|
540
540
|
class: undefined,
|
|
541
541
|
enabled: true,
|
|
542
542
|
tooltip: "",
|
|
543
|
-
label: ( localize(
|
|
543
|
+
label: ( localize(11213, "Open Configuration")),
|
|
544
544
|
run: () => this._editorService.openEditor({
|
|
545
545
|
resource: collection.presentation.origin,
|
|
546
546
|
options: {
|
|
@@ -41,7 +41,7 @@ let McpSamplingLog = class McpSamplingLog extends Disposable {
|
|
|
41
41
|
}
|
|
42
42
|
const parts = [];
|
|
43
43
|
const total = record.bins.reduce((sum, value) => sum + value, 0);
|
|
44
|
-
parts.push(( localize(
|
|
44
|
+
parts.push(( localize(11214, "{0} total requests in the last 7 days.", total)));
|
|
45
45
|
parts.push(this._formatRecentRequests(record));
|
|
46
46
|
return parts.join("\n");
|
|
47
47
|
}
|
|
@@ -131,11 +131,11 @@ let McpSamplingService = class McpSamplingService extends Disposable {
|
|
|
131
131
|
return this._getMatchingModel(opts);
|
|
132
132
|
}
|
|
133
133
|
const retry = await this._showContextual(opts.isDuringToolCall, ( localize(
|
|
134
|
-
|
|
134
|
+
11215,
|
|
135
135
|
"Allow MCP tools from \"{0}\" to make LLM requests?",
|
|
136
136
|
opts.server.definition.label
|
|
137
137
|
)), ( localize(
|
|
138
|
-
|
|
138
|
+
11216,
|
|
139
139
|
"The MCP server \"{0}\" has issued a request to make a language model call. Do you want to allow it to make requests during chat?",
|
|
140
140
|
opts.server.definition.label
|
|
141
141
|
)), this.allowButtons(opts.server, "allowedDuringChat"));
|
|
@@ -149,11 +149,11 @@ let McpSamplingService = class McpSamplingService extends Disposable {
|
|
|
149
149
|
return this._getMatchingModel(opts);
|
|
150
150
|
}
|
|
151
151
|
const retry = await this._showContextual(opts.isDuringToolCall, ( localize(
|
|
152
|
-
|
|
152
|
+
11217,
|
|
153
153
|
"Allow MCP server \"{0}\" to make LLM requests?",
|
|
154
154
|
opts.server.definition.label
|
|
155
155
|
)), ( localize(
|
|
156
|
-
|
|
156
|
+
11218,
|
|
157
157
|
"The MCP server \"{0}\" has issued a request to make a language model call. Do you want to allow it to make requests, outside of tool calls during chat?",
|
|
158
158
|
opts.server.definition.label
|
|
159
159
|
)), this.allowButtons(opts.server, "allowedOutsideChat"));
|
|
@@ -165,12 +165,12 @@ let McpSamplingService = class McpSamplingService extends Disposable {
|
|
|
165
165
|
throw McpError.notAllowed();
|
|
166
166
|
} else if (model === ModelMatch.NoMatchingModel) {
|
|
167
167
|
const newlyPickedModels = opts.isDuringToolCall ? await this._commandService.executeCommand(McpCommandIds.ConfigureSamplingModels, opts.server) : await this._notify(( localize(
|
|
168
|
-
|
|
168
|
+
11219,
|
|
169
169
|
"MCP server \"{0}\" triggered a language model request, but it has no allowlisted models.",
|
|
170
170
|
opts.server.definition.label
|
|
171
171
|
)), {
|
|
172
|
-
[( localize(
|
|
173
|
-
[( localize(
|
|
172
|
+
[( localize(11220, "Configure"))]: () => this._commandService.executeCommand(McpCommandIds.ConfigureSamplingModels, opts.server),
|
|
173
|
+
[( localize(11221, "Cancel"))]: () => Promise.resolve(undefined)
|
|
174
174
|
});
|
|
175
175
|
if (newlyPickedModels) {
|
|
176
176
|
return this._getMatchingModel(opts);
|
|
@@ -181,19 +181,19 @@ let McpSamplingService = class McpSamplingService extends Disposable {
|
|
|
181
181
|
}
|
|
182
182
|
allowButtons(server, key) {
|
|
183
183
|
return {
|
|
184
|
-
[( localize(
|
|
184
|
+
[( localize(11222, "Allow in this Session"))]: async () => {
|
|
185
185
|
this._sessionSets[key].set(server.definition.id, true);
|
|
186
186
|
return true;
|
|
187
187
|
},
|
|
188
|
-
[( localize(
|
|
188
|
+
[( localize(11223, "Always"))]: async () => {
|
|
189
189
|
await this.updateConfig(server, c => c[key] = true);
|
|
190
190
|
return true;
|
|
191
191
|
},
|
|
192
|
-
[( localize(
|
|
192
|
+
[( localize(11224, "Not Now"))]: async () => {
|
|
193
193
|
this._sessionSets[key].set(server.definition.id, false);
|
|
194
194
|
return false;
|
|
195
195
|
},
|
|
196
|
-
[( localize(
|
|
196
|
+
[( localize(11225, "Never"))]: async () => {
|
|
197
197
|
await this.updateConfig(server, c => c[key] = false);
|
|
198
198
|
return false;
|
|
199
199
|
}
|
|
@@ -102,11 +102,11 @@ let McpSandboxService = class McpSandboxService extends Disposable {
|
|
|
102
102
|
const suggestionLines = [];
|
|
103
103
|
if (allowedDomainsList.length) {
|
|
104
104
|
const shown = ( allowedDomainsList.map(domain => `"${domain}"`)).join(", ");
|
|
105
|
-
suggestionLines.push(( localize(
|
|
105
|
+
suggestionLines.push(( localize(11226, "Add to `sandbox.network.allowedDomains`: {0}", shown)));
|
|
106
106
|
}
|
|
107
107
|
if (allowWriteList.length) {
|
|
108
108
|
const shown = ( allowWriteList.map(path => `"${path}"`)).join(", ");
|
|
109
|
-
suggestionLines.push(( localize(
|
|
109
|
+
suggestionLines.push(( localize(11227, "Add to `sandbox.filesystem.allowWrite`: {0}", shown)));
|
|
110
110
|
}
|
|
111
111
|
const sandboxConfig = {};
|
|
112
112
|
if (allowedDomainsList.length) {
|
|
@@ -121,7 +121,7 @@ let McpSandboxService = class McpSandboxService extends Disposable {
|
|
|
121
121
|
}
|
|
122
122
|
return {
|
|
123
123
|
message: ( localize(
|
|
124
|
-
|
|
124
|
+
11228,
|
|
125
125
|
"The MCP server {0} reported potential sandbox blocks. VS Code found possible sandbox configuration updates:\n{1}",
|
|
126
126
|
serverLabel,
|
|
127
127
|
suggestionLines.join("\n")
|
|
@@ -52,7 +52,7 @@ let McpServerConnection = class McpServerConnection extends Disposable {
|
|
|
52
52
|
this._state.set({
|
|
53
53
|
state: McpConnectionState.Kind.Starting
|
|
54
54
|
}, undefined);
|
|
55
|
-
this._logger.info(( localize(
|
|
55
|
+
this._logger.info(( localize(11244, "Starting server {0}", this.definition.label)));
|
|
56
56
|
try {
|
|
57
57
|
const launch = this._delegate.start(this._collection, this.definition, this.launchDefinition, {
|
|
58
58
|
errorOnUserInteraction: this._errorOnUserInteraction
|
|
@@ -89,7 +89,7 @@ let McpServerConnection = class McpServerConnection extends Disposable {
|
|
|
89
89
|
store.add(autorun(reader => {
|
|
90
90
|
const state = launch.state.read(reader);
|
|
91
91
|
this._state.set(state, undefined);
|
|
92
|
-
this._logger.info(( localize(
|
|
92
|
+
this._logger.info(( localize(11245, "Connection state: {0}", (McpConnectionState.toString(state)))));
|
|
93
93
|
if (state.state === McpConnectionState.Kind.Running && !didStart) {
|
|
94
94
|
didStart = true;
|
|
95
95
|
McpServerRequestHandler.create(this._instantiationService, {
|
|
@@ -128,7 +128,7 @@ let McpServerConnection = class McpServerConnection extends Disposable {
|
|
|
128
128
|
};
|
|
129
129
|
}
|
|
130
130
|
async stop() {
|
|
131
|
-
this._logger.info(( localize(
|
|
131
|
+
this._logger.info(( localize(11246, "Stopping server {0}", this.definition.label)));
|
|
132
132
|
this._launch.value?.object.stop();
|
|
133
133
|
await this._waitForState(McpConnectionState.Kind.Stopped, McpConnectionState.Kind.Error);
|
|
134
134
|
}
|
|
@@ -120,7 +120,7 @@ let AuthenticationMcpService = class AuthenticationMcpService extends Disposable
|
|
|
120
120
|
numberOfRequests += ( Object.keys(accessRequest)).length;
|
|
121
121
|
});
|
|
122
122
|
if (numberOfRequests > 0) {
|
|
123
|
-
const badge = ( new NumberBadge(numberOfRequests, () => ( localize(
|
|
123
|
+
const badge = ( new NumberBadge(numberOfRequests, () => ( localize(16353, "Sign in requested"))));
|
|
124
124
|
this._accountBadgeDisposable.value = this.activityService.showAccountsActivity({
|
|
125
125
|
badge
|
|
126
126
|
});
|
|
@@ -194,17 +194,17 @@ let AuthenticationMcpService = class AuthenticationMcpService extends Disposable
|
|
|
194
194
|
} = await this.dialogService.prompt({
|
|
195
195
|
type: Severity.Info,
|
|
196
196
|
message: ( localize(
|
|
197
|
-
|
|
197
|
+
16354,
|
|
198
198
|
"The MCP server '{0}' wants to access the {1} account '{2}'.",
|
|
199
199
|
mcpServerName,
|
|
200
200
|
provider.label,
|
|
201
201
|
accountName
|
|
202
202
|
)),
|
|
203
203
|
buttons: [{
|
|
204
|
-
label: ( localize(
|
|
204
|
+
label: ( localize(16355, "&&Allow")),
|
|
205
205
|
run: () => SessionPromptChoice.Allow
|
|
206
206
|
}, {
|
|
207
|
-
label: ( localize(
|
|
207
|
+
label: ( localize(16356, "&&Deny")),
|
|
208
208
|
run: () => SessionPromptChoice.Deny
|
|
209
209
|
}],
|
|
210
210
|
cancelButton: {
|
|
@@ -246,17 +246,17 @@ let AuthenticationMcpService = class AuthenticationMcpService extends Disposable
|
|
|
246
246
|
}
|
|
247
247
|
});
|
|
248
248
|
items.push({
|
|
249
|
-
label: ( localize(
|
|
249
|
+
label: ( localize(16357, "Sign in to another account"))
|
|
250
250
|
});
|
|
251
251
|
quickPick.items = items;
|
|
252
252
|
quickPick.title = ( localize(
|
|
253
|
-
|
|
253
|
+
16358,
|
|
254
254
|
"The MCP server '{0}' wants to access a {1} account",
|
|
255
255
|
mcpServerName,
|
|
256
256
|
this._authenticationService.getProvider(providerId).label
|
|
257
257
|
));
|
|
258
258
|
quickPick.placeholder = ( localize(
|
|
259
|
-
|
|
259
|
+
16359,
|
|
260
260
|
"Select an account for '{0}' to use or Esc to cancel",
|
|
261
261
|
mcpServerName
|
|
262
262
|
));
|
|
@@ -336,7 +336,7 @@ let AuthenticationMcpService = class AuthenticationMcpService extends Disposable
|
|
|
336
336
|
group: "3_accessRequests",
|
|
337
337
|
command: {
|
|
338
338
|
id: `${providerId}${mcpServerId}Access`,
|
|
339
|
-
title: ( localize(
|
|
339
|
+
title: ( localize(16360, "Grant access to {0} for {1}... (1)", provider.label, mcpServerName))
|
|
340
340
|
}
|
|
341
341
|
}));
|
|
342
342
|
const accessCommand = CommandsRegistry.registerCommand({
|
|
@@ -380,7 +380,7 @@ let AuthenticationMcpService = class AuthenticationMcpService extends Disposable
|
|
|
380
380
|
group: "2_signInRequests",
|
|
381
381
|
command: {
|
|
382
382
|
id: commandId,
|
|
383
|
-
title: ( localize(
|
|
383
|
+
title: ( localize(16361, "Sign in with {0} to use {1} (1)", provider.label, mcpServerName))
|
|
384
384
|
}
|
|
385
385
|
}));
|
|
386
386
|
const signInCommand = CommandsRegistry.registerCommand({
|