@codingame/monaco-vscode-mcp-service-override 37.0.0 → 37.2.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/index.js +1 -0
- package/package.json +2 -2
- package/vscode/src/vs/platform/mcp/common/allowedMcpServersService.js +3 -3
- package/vscode/src/vs/platform/mcp/common/mcpGalleryService.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadMcp.d.ts +108 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadMcp.js +698 -0
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcp.contribution.js +3 -3
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpAddContextContribution.js +2 -2
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpCommands.js +96 -96
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpElicitationService.js +25 -25
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpLanguageFeatures.js +35 -35
- 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 +5 -5
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServersView.js +17 -17
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpWorkbenchService.js +10 -10
- 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
|
@@ -91,7 +91,7 @@ class ListMcpServerCommand extends Action2 {
|
|
|
91
91
|
constructor() {
|
|
92
92
|
super({
|
|
93
93
|
id: McpCommandIds.ListServer,
|
|
94
|
-
title: ( localize2(
|
|
94
|
+
title: ( localize2(13728, "List Servers")),
|
|
95
95
|
icon: Codicon.server,
|
|
96
96
|
category,
|
|
97
97
|
f1: true,
|
|
@@ -144,7 +144,7 @@ class ListMcpServerCommand extends Action2 {
|
|
|
144
144
|
const pick = quickInput.createQuickPick({
|
|
145
145
|
useSeparators: true
|
|
146
146
|
});
|
|
147
|
-
pick.placeholder = ( localize(
|
|
147
|
+
pick.placeholder = ( localize(13729, "Select an MCP Server"));
|
|
148
148
|
mcpService.activateCollections();
|
|
149
149
|
store.add(pick);
|
|
150
150
|
store.add(autorun(reader => {
|
|
@@ -156,8 +156,8 @@ class ListMcpServerCommand extends Action2 {
|
|
|
156
156
|
const previousActiveId = pick.activeItems[0]?.id;
|
|
157
157
|
pick.items = [{
|
|
158
158
|
id: "$add",
|
|
159
|
-
label: ( localize(
|
|
160
|
-
description: ( localize(
|
|
159
|
+
label: ( localize(13730, "Add Server")),
|
|
160
|
+
description: ( localize(13731, "Add a new server configuration")),
|
|
161
161
|
alwaysShow: true,
|
|
162
162
|
iconClass: ThemeIcon.asClassName(Codicon.add)
|
|
163
163
|
}, ...( Object.values(servers)).filter(s => s.length).flatMap(servers => [{
|
|
@@ -169,7 +169,7 @@ class ListMcpServerCommand extends Action2 {
|
|
|
169
169
|
return {
|
|
170
170
|
id: server.definition.id,
|
|
171
171
|
label: server.definition.label,
|
|
172
|
-
description: disabled ? ( localize(
|
|
172
|
+
description: disabled ? ( localize(13732, "Disabled")) : ( McpConnectionState.toString(server.connectionState.read(reader)))
|
|
173
173
|
};
|
|
174
174
|
}))])];
|
|
175
175
|
if (previousActiveId) {
|
|
@@ -211,7 +211,7 @@ class ListMcpServerCommand extends Action2 {
|
|
|
211
211
|
const pick = quickInput.createQuickPick({
|
|
212
212
|
useSeparators: true
|
|
213
213
|
});
|
|
214
|
-
pick.placeholder = ( localize(
|
|
214
|
+
pick.placeholder = ( localize(13733, "Select an MCP Server for this session"));
|
|
215
215
|
store.add(pick);
|
|
216
216
|
const refresh = () => {
|
|
217
217
|
const firstRun = pick.items.length === 0;
|
|
@@ -219,20 +219,20 @@ class ListMcpServerCommand extends Action2 {
|
|
|
219
219
|
const servers = agentHostCustomizations.getMcpServers(agentHostSession);
|
|
220
220
|
pick.items = [...(servers.length === 0 ? [{
|
|
221
221
|
id: "$empty",
|
|
222
|
-
label: ( localize(
|
|
223
|
-
description: ( localize(
|
|
222
|
+
label: ( localize(13734, "No MCP servers")),
|
|
223
|
+
description: ( localize(13735, "This session does not expose any MCP servers")),
|
|
224
224
|
alwaysShow: true
|
|
225
225
|
}] : ( servers.map(server => ({
|
|
226
226
|
id: server.id,
|
|
227
227
|
server,
|
|
228
228
|
label: server.name,
|
|
229
|
-
description: server.enabled ? mcpServerStatusToLabel(server.status) : ( localize(
|
|
229
|
+
description: server.enabled ? mcpServerStatusToLabel(server.status) : ( localize(13732, "Disabled")),
|
|
230
230
|
buttons: getAgentHostMcpServerButtons(server)
|
|
231
231
|
})))), {
|
|
232
232
|
type: "separator"
|
|
233
233
|
}, {
|
|
234
234
|
id: BACK_ID,
|
|
235
|
-
label: ( localize(
|
|
235
|
+
label: ( localize(13736, "Show locally configured servers...")),
|
|
236
236
|
iconClass: ThemeIcon.asClassName(Codicon.arrowLeft),
|
|
237
237
|
alwaysShow: true
|
|
238
238
|
}];
|
|
@@ -286,12 +286,12 @@ function isAgentHostMcpServerButton(button) {
|
|
|
286
286
|
}
|
|
287
287
|
const startAgentHostMcpServerButton = {
|
|
288
288
|
iconClass: ThemeIcon.asClassName(Codicon.play),
|
|
289
|
-
tooltip: ( localize(
|
|
289
|
+
tooltip: ( localize(13737, "Start Server")),
|
|
290
290
|
action: "start"
|
|
291
291
|
};
|
|
292
292
|
const stopAgentHostMcpServerButton = {
|
|
293
293
|
iconClass: ThemeIcon.asClassName(Codicon.debugStop),
|
|
294
|
-
tooltip: ( localize(
|
|
294
|
+
tooltip: ( localize(13738, "Stop Server")),
|
|
295
295
|
action: "stop"
|
|
296
296
|
};
|
|
297
297
|
function getAgentHostMcpServerButtons(server) {
|
|
@@ -319,21 +319,21 @@ async function runAgentHostMcpServerLifecycleAction(server, action, services) {
|
|
|
319
319
|
} catch (error) {
|
|
320
320
|
services.logService.error(`Failed to ${action} MCP server '${server.name}'`, error);
|
|
321
321
|
const message = error instanceof Error ? error.message : String(error);
|
|
322
|
-
services.notificationService.error(action === "start" ? ( localize(
|
|
322
|
+
services.notificationService.error(action === "start" ? ( localize(13739, "Failed to start MCP server '{0}': {1}", server.name, message)) : ( localize(13740, "Failed to stop MCP server '{0}': {1}", server.name, message)));
|
|
323
323
|
}
|
|
324
324
|
}
|
|
325
325
|
function mcpServerStatusToLabel(status) {
|
|
326
326
|
switch (status) {
|
|
327
327
|
case McpServerStatus.Starting:
|
|
328
|
-
return localize(
|
|
328
|
+
return localize(13741, "Starting");
|
|
329
329
|
case McpServerStatus.Ready:
|
|
330
|
-
return localize(
|
|
330
|
+
return localize(13742, "Running");
|
|
331
331
|
case McpServerStatus.AuthRequired:
|
|
332
|
-
return localize(
|
|
332
|
+
return localize(13743, "Authentication required");
|
|
333
333
|
case McpServerStatus.Error:
|
|
334
|
-
return localize(
|
|
334
|
+
return localize(13744, "Error");
|
|
335
335
|
case McpServerStatus.Stopped:
|
|
336
|
-
return localize(
|
|
336
|
+
return localize(13745, "Stopped");
|
|
337
337
|
default:
|
|
338
338
|
return "";
|
|
339
339
|
}
|
|
@@ -343,19 +343,19 @@ function getAgentHostMcpServerEnablementItems(server, hasWorkspace, scopes = ["g
|
|
|
343
343
|
const items = [];
|
|
344
344
|
if (scopes.includes("global")) {
|
|
345
345
|
items.push({
|
|
346
|
-
label: enablement.global ? ( localize(
|
|
346
|
+
label: enablement.global ? ( localize(13746, "Disable")) : ( localize(13747, "Enable")),
|
|
347
347
|
action: enablement.global ? "disableProfile" : "enableProfile"
|
|
348
348
|
});
|
|
349
349
|
}
|
|
350
350
|
if (scopes.includes("workspace") && hasWorkspace) {
|
|
351
351
|
items.push({
|
|
352
|
-
label: enablement.workspace ? ( localize(
|
|
352
|
+
label: enablement.workspace ? ( localize(13748, "Disable (Workspace)")) : ( localize(13749, "Enable (Workspace)")),
|
|
353
353
|
action: enablement.workspace ? "disableWorkspace" : "enableWorkspace"
|
|
354
354
|
});
|
|
355
355
|
}
|
|
356
356
|
if (scopes.includes("session")) {
|
|
357
357
|
items.push({
|
|
358
|
-
label: enablement.session ? ( localize(
|
|
358
|
+
label: enablement.session ? ( localize(13750, "Disable (Session)")) : ( localize(13751, "Enable (Session)")),
|
|
359
359
|
action: enablement.session ? "disableSession" : "enableSession"
|
|
360
360
|
});
|
|
361
361
|
}
|
|
@@ -365,23 +365,23 @@ function getLocalMcpServerEnablementItems(disabled, isEmptyWorkbench, includeWor
|
|
|
365
365
|
const items = [];
|
|
366
366
|
if (disabled) {
|
|
367
367
|
items.push({
|
|
368
|
-
label: ( localize(
|
|
368
|
+
label: ( localize(13747, "Enable")),
|
|
369
369
|
action: "enableProfile"
|
|
370
370
|
});
|
|
371
371
|
if (includeWorkspace && !isEmptyWorkbench) {
|
|
372
372
|
items.push({
|
|
373
|
-
label: ( localize(
|
|
373
|
+
label: ( localize(13749, "Enable (Workspace)")),
|
|
374
374
|
action: "enableWorkspace"
|
|
375
375
|
});
|
|
376
376
|
}
|
|
377
377
|
} else {
|
|
378
378
|
items.push({
|
|
379
|
-
label: ( localize(
|
|
379
|
+
label: ( localize(13746, "Disable")),
|
|
380
380
|
action: "disableProfile"
|
|
381
381
|
});
|
|
382
382
|
if (includeWorkspace && !isEmptyWorkbench) {
|
|
383
383
|
items.push({
|
|
384
|
-
label: ( localize(
|
|
384
|
+
label: ( localize(13748, "Disable (Workspace)")),
|
|
385
385
|
action: "disableWorkspace"
|
|
386
386
|
});
|
|
387
387
|
}
|
|
@@ -415,7 +415,7 @@ class McpAgentHostServerOptionsCommand extends Action2 {
|
|
|
415
415
|
constructor() {
|
|
416
416
|
super({
|
|
417
417
|
id: McpCommandIds.AgentHostServerOptions,
|
|
418
|
-
title: ( localize2(
|
|
418
|
+
title: ( localize2(13752, "Agent Host Server Options")),
|
|
419
419
|
category,
|
|
420
420
|
f1: false
|
|
421
421
|
});
|
|
@@ -434,17 +434,17 @@ class McpAgentHostServerOptionsCommand extends Action2 {
|
|
|
434
434
|
}
|
|
435
435
|
const items = [{
|
|
436
436
|
type: "separator",
|
|
437
|
-
label: ( localize(
|
|
437
|
+
label: ( localize(13753, "Status"))
|
|
438
438
|
}];
|
|
439
439
|
if (canStartAgentHostMcpServer(server)) {
|
|
440
440
|
items.push({
|
|
441
|
-
label: ( localize(
|
|
441
|
+
label: ( localize(13737, "Start Server")),
|
|
442
442
|
description: mcpServerStatusToLabel(server.status),
|
|
443
443
|
action: "start"
|
|
444
444
|
});
|
|
445
445
|
} else if (canStopAgentHostMcpServer(server)) {
|
|
446
446
|
items.push({
|
|
447
|
-
label: ( localize(
|
|
447
|
+
label: ( localize(13738, "Stop Server")),
|
|
448
448
|
description: mcpServerStatusToLabel(server.status),
|
|
449
449
|
action: "stop"
|
|
450
450
|
});
|
|
@@ -455,11 +455,11 @@ class McpAgentHostServerOptionsCommand extends Action2 {
|
|
|
455
455
|
const isEmptyWorkbench = aiCustomizationWorkspaceService.getActiveProjectRoot() === undefined;
|
|
456
456
|
items.push({
|
|
457
457
|
type: "separator",
|
|
458
|
-
label: ( localize(
|
|
458
|
+
label: ( localize(13754, "Enablement"))
|
|
459
459
|
});
|
|
460
460
|
if (pluginDisabled) {
|
|
461
461
|
items.push({
|
|
462
|
-
label: ( localize(
|
|
462
|
+
label: ( localize(13755, "Enable Plugin")),
|
|
463
463
|
action: "enablePlugin"
|
|
464
464
|
});
|
|
465
465
|
} else {
|
|
@@ -477,13 +477,13 @@ class McpAgentHostServerOptionsCommand extends Action2 {
|
|
|
477
477
|
}
|
|
478
478
|
if (server.enabled && server.state.kind === McpServerStatus.AuthRequired) {
|
|
479
479
|
items.push({
|
|
480
|
-
label: ( localize(
|
|
480
|
+
label: ( localize(13756, "Authenticate")),
|
|
481
481
|
description: server.state.resource.resource,
|
|
482
482
|
action: "authenticate"
|
|
483
483
|
});
|
|
484
484
|
}
|
|
485
485
|
items.push({
|
|
486
|
-
label: ( localize(
|
|
486
|
+
label: ( localize(13757, "Show Output")),
|
|
487
487
|
action: "showOutput"
|
|
488
488
|
});
|
|
489
489
|
const picked = await quickInputService.pick(items, {
|
|
@@ -540,7 +540,7 @@ class McpConfirmationServerOptionsCommand extends Action2 {
|
|
|
540
540
|
constructor() {
|
|
541
541
|
super({
|
|
542
542
|
id: McpCommandIds.ServerOptionsInConfirmation,
|
|
543
|
-
title: ( localize2(
|
|
543
|
+
title: ( localize2(13758, "Server Options")),
|
|
544
544
|
category,
|
|
545
545
|
icon: Codicon.settingsGear,
|
|
546
546
|
f1: false,
|
|
@@ -571,7 +571,7 @@ class McpServerOptionsCommand extends Action2 {
|
|
|
571
571
|
constructor() {
|
|
572
572
|
super({
|
|
573
573
|
id: McpCommandIds.ServerOptions,
|
|
574
|
-
title: ( localize2(
|
|
574
|
+
title: ( localize2(13758, "Server Options")),
|
|
575
575
|
category,
|
|
576
576
|
f1: false
|
|
577
577
|
});
|
|
@@ -596,25 +596,25 @@ class McpServerOptionsCommand extends Action2 {
|
|
|
596
596
|
const disabled = isContributionDisabled(server.enablement.get());
|
|
597
597
|
items.push({
|
|
598
598
|
type: "separator",
|
|
599
|
-
label: ( localize(
|
|
599
|
+
label: ( localize(13753, "Status"))
|
|
600
600
|
});
|
|
601
601
|
if (disabled) {
|
|
602
602
|
items.push({
|
|
603
|
-
label: ( localize(
|
|
603
|
+
label: ( localize(13759, "Enable Server (Workspace)")),
|
|
604
604
|
action: "enable"
|
|
605
605
|
});
|
|
606
606
|
} else if (McpConnectionState.canBeStarted(serverState.state)) {
|
|
607
607
|
items.push({
|
|
608
|
-
label: ( localize(
|
|
608
|
+
label: ( localize(13737, "Start Server")),
|
|
609
609
|
action: "start"
|
|
610
610
|
});
|
|
611
611
|
} else {
|
|
612
612
|
items.push({
|
|
613
|
-
label: ( localize(
|
|
613
|
+
label: ( localize(13738, "Stop Server")),
|
|
614
614
|
action: "stop"
|
|
615
615
|
});
|
|
616
616
|
items.push({
|
|
617
|
-
label: ( localize(
|
|
617
|
+
label: ( localize(13760, "Restart Server")),
|
|
618
618
|
action: "restart"
|
|
619
619
|
});
|
|
620
620
|
}
|
|
@@ -622,26 +622,26 @@ class McpServerOptionsCommand extends Action2 {
|
|
|
622
622
|
const configTarget = serverDefinition?.presentation?.origin || collection?.presentation?.origin;
|
|
623
623
|
if (configTarget) {
|
|
624
624
|
items.push({
|
|
625
|
-
label: ( localize(
|
|
625
|
+
label: ( localize(13761, "Show Configuration")),
|
|
626
626
|
action: "config"
|
|
627
627
|
});
|
|
628
628
|
}
|
|
629
629
|
items.push({
|
|
630
|
-
label: ( localize(
|
|
630
|
+
label: ( localize(13757, "Show Output")),
|
|
631
631
|
action: "showOutput"
|
|
632
632
|
});
|
|
633
633
|
items.push({
|
|
634
634
|
type: "separator",
|
|
635
|
-
label: ( localize(
|
|
635
|
+
label: ( localize(13762, "Sampling"))
|
|
636
636
|
}, {
|
|
637
|
-
label: ( localize(
|
|
638
|
-
description: ( localize(
|
|
637
|
+
label: ( localize(13763, "Configure Model Access")),
|
|
638
|
+
description: ( localize(13764, "Set the models the server can use via MCP sampling")),
|
|
639
639
|
action: "configSampling"
|
|
640
640
|
});
|
|
641
641
|
if (samplingService.hasLogs(server)) {
|
|
642
642
|
items.push({
|
|
643
|
-
label: ( localize(
|
|
644
|
-
description: ( localize(
|
|
643
|
+
label: ( localize(13765, "Show Sampling Requests")),
|
|
644
|
+
description: ( localize(13766, "Show the sampling requests for this server")),
|
|
645
645
|
action: "samplingLog"
|
|
646
646
|
});
|
|
647
647
|
}
|
|
@@ -649,15 +649,15 @@ class McpServerOptionsCommand extends Action2 {
|
|
|
649
649
|
if (capabilities === undefined || (capabilities & McpCapability.Resources)) {
|
|
650
650
|
items.push({
|
|
651
651
|
type: "separator",
|
|
652
|
-
label: ( localize(
|
|
652
|
+
label: ( localize(13767, "Resources"))
|
|
653
653
|
});
|
|
654
654
|
items.push({
|
|
655
|
-
label: ( localize(
|
|
655
|
+
label: ( localize(13768, "Browse Resources")),
|
|
656
656
|
action: "resources"
|
|
657
657
|
});
|
|
658
658
|
}
|
|
659
659
|
const pick = await quickInputService.pick(items, {
|
|
660
|
-
placeHolder: ( localize(
|
|
660
|
+
placeHolder: ( localize(13769, "Select action for '{0}'", server.definition.label))
|
|
661
661
|
});
|
|
662
662
|
if (!pick) {
|
|
663
663
|
return;
|
|
@@ -708,7 +708,7 @@ class McpServerOptionsCommand extends Action2 {
|
|
|
708
708
|
editorService.openEditor({
|
|
709
709
|
resource: undefined,
|
|
710
710
|
contents: samplingService.getLogText(server),
|
|
711
|
-
label: ( localize(
|
|
711
|
+
label: ( localize(13770, "MCP Sampling: {0}", server.definition.label))
|
|
712
712
|
});
|
|
713
713
|
break;
|
|
714
714
|
default:
|
|
@@ -725,14 +725,14 @@ class McpServerOptionsCommand extends Action2 {
|
|
|
725
725
|
if (accountQuery.entities().getEntityCount().total > 1) {
|
|
726
726
|
result.push({
|
|
727
727
|
action: "disconnect",
|
|
728
|
-
label: ( localize(
|
|
728
|
+
label: ( localize(13771, "Disconnect Account")),
|
|
729
729
|
description: `(${accountName})`,
|
|
730
730
|
accountQuery
|
|
731
731
|
});
|
|
732
732
|
} else {
|
|
733
733
|
result.push({
|
|
734
734
|
action: "signout",
|
|
735
|
-
label: ( localize(
|
|
735
|
+
label: ( localize(13772, "Sign Out")),
|
|
736
736
|
description: `(${accountName})`,
|
|
737
737
|
accountQuery
|
|
738
738
|
});
|
|
@@ -907,24 +907,24 @@ let MCPServerActionRendering = class MCPServerActionRendering extends Disposable
|
|
|
907
907
|
text: s.definition.label,
|
|
908
908
|
id: McpCommandIds.ServerOptions,
|
|
909
909
|
arguments: [s.definition.id],
|
|
910
|
-
tooltip: ( localize(
|
|
910
|
+
tooltip: ( localize(13773, "Show server options for {0}", s.definition.label))
|
|
911
911
|
});
|
|
912
912
|
const single = servers.length === 1;
|
|
913
913
|
const names = ( ( servers.map(s => isServer(s) ? link(s) : "`" + s.label + "`")).map(l => single ? l : `- ${l}`)).join("\n");
|
|
914
914
|
let markdown;
|
|
915
915
|
if (state === DisplayedState.NewTools) {
|
|
916
916
|
markdown = ( new MarkdownString(single ? ( localize(
|
|
917
|
-
|
|
917
|
+
13774,
|
|
918
918
|
"MCP server {0} has been updated and may have new tools available.",
|
|
919
919
|
names
|
|
920
920
|
)) : ( localize(
|
|
921
|
-
|
|
921
|
+
13775,
|
|
922
922
|
"MCP servers have been updated and may have new tools available:\n\n{0}",
|
|
923
923
|
names
|
|
924
924
|
))));
|
|
925
925
|
} else if (state === DisplayedState.Error) {
|
|
926
|
-
markdown = ( new MarkdownString(single ? ( localize(
|
|
927
|
-
|
|
926
|
+
markdown = ( new MarkdownString(single ? ( localize(13776, "MCP server {0} was unable to start successfully.", names)) : ( localize(
|
|
927
|
+
13777,
|
|
928
928
|
"Multiple MCP servers were unable to start successfully:\n\n{0}",
|
|
929
929
|
names
|
|
930
930
|
))));
|
|
@@ -951,7 +951,7 @@ let MCPServerActionRendering = class MCPServerActionRendering extends Disposable
|
|
|
951
951
|
const divider = $("hr.mcp-hover-divider");
|
|
952
952
|
container.appendChild(divider);
|
|
953
953
|
const checkboxContainer = $("div.mcp-hover-setting");
|
|
954
|
-
const settingLabelStr = ( localize(
|
|
954
|
+
const settingLabelStr = ( localize(13778, "Automatically start MCP servers when sending a chat message"));
|
|
955
955
|
const checkbox = store.add(( new Checkbox(settingLabelStr, config.get() !== McpAutoStartValue.Never, {
|
|
956
956
|
...defaultCheckboxStyles
|
|
957
957
|
})));
|
|
@@ -979,11 +979,11 @@ let MCPServerActionRendering = class MCPServerActionRendering extends Disposable
|
|
|
979
979
|
} = displayedStateCurrent.get()
|
|
980
980
|
) {
|
|
981
981
|
if (state === DisplayedState.NewTools) {
|
|
982
|
-
return localize(
|
|
982
|
+
return localize(13779, "New tools available ({0})", servers.length || 1);
|
|
983
983
|
} else if (state === DisplayedState.Error) {
|
|
984
|
-
return localize(
|
|
984
|
+
return localize(13780, "Error loading {0} tool(s)", servers.length || 1);
|
|
985
985
|
} else if (state === DisplayedState.Refreshing) {
|
|
986
|
-
return localize(
|
|
986
|
+
return localize(13781, "Discovering tools...");
|
|
987
987
|
} else {
|
|
988
988
|
return null;
|
|
989
989
|
}
|
|
@@ -1001,7 +1001,7 @@ class ResetMcpTrustCommand extends Action2 {
|
|
|
1001
1001
|
constructor() {
|
|
1002
1002
|
super({
|
|
1003
1003
|
id: McpCommandIds.ResetTrust,
|
|
1004
|
-
title: ( localize2(
|
|
1004
|
+
title: ( localize2(13782, "Reset Trust")),
|
|
1005
1005
|
category,
|
|
1006
1006
|
f1: true,
|
|
1007
1007
|
precondition: ( ContextKeyExpr.and(McpContextKeys.toolsCount.greater(0), ( ChatContextKeys.Setup.hidden.negate()), ( ChatContextKeys.Setup.disabledInWorkspace.negate())))
|
|
@@ -1016,7 +1016,7 @@ class ResetMcpCachedTools extends Action2 {
|
|
|
1016
1016
|
constructor() {
|
|
1017
1017
|
super({
|
|
1018
1018
|
id: McpCommandIds.ResetCachedTools,
|
|
1019
|
-
title: ( localize2(
|
|
1019
|
+
title: ( localize2(13783, "Reset Cached Tools")),
|
|
1020
1020
|
category,
|
|
1021
1021
|
f1: true,
|
|
1022
1022
|
precondition: ( ContextKeyExpr.and(McpContextKeys.toolsCount.greater(0), ( ChatContextKeys.Setup.hidden.negate()), ( ChatContextKeys.Setup.disabledInWorkspace.negate())))
|
|
@@ -1031,9 +1031,9 @@ class AddConfigurationAction extends Action2 {
|
|
|
1031
1031
|
constructor() {
|
|
1032
1032
|
super({
|
|
1033
1033
|
id: McpCommandIds.AddConfiguration,
|
|
1034
|
-
title: ( localize2(
|
|
1034
|
+
title: ( localize2(13784, "Add Server...")),
|
|
1035
1035
|
metadata: {
|
|
1036
|
-
description: ( localize2(
|
|
1036
|
+
description: ( localize2(13785, "Installs a new Model Context protocol to the mcp.json settings"))
|
|
1037
1037
|
},
|
|
1038
1038
|
category,
|
|
1039
1039
|
f1: true,
|
|
@@ -1055,9 +1055,9 @@ class InstallFromManifestAction extends Action2 {
|
|
|
1055
1055
|
constructor() {
|
|
1056
1056
|
super({
|
|
1057
1057
|
id: McpCommandIds.InstallFromManifest,
|
|
1058
|
-
title: ( localize2(
|
|
1058
|
+
title: ( localize2(13786, "Install Server from Manifest...")),
|
|
1059
1059
|
metadata: {
|
|
1060
|
-
description: ( localize2(
|
|
1060
|
+
description: ( localize2(13787, "Install an MCP server from a JSON manifest file"))
|
|
1061
1061
|
},
|
|
1062
1062
|
category,
|
|
1063
1063
|
f1: true,
|
|
@@ -1073,7 +1073,7 @@ class RemoveStoredInput extends Action2 {
|
|
|
1073
1073
|
constructor() {
|
|
1074
1074
|
super({
|
|
1075
1075
|
id: McpCommandIds.RemoveStoredInput,
|
|
1076
|
-
title: ( localize2(
|
|
1076
|
+
title: ( localize2(13783, "Reset Cached Tools")),
|
|
1077
1077
|
category,
|
|
1078
1078
|
f1: false
|
|
1079
1079
|
});
|
|
@@ -1086,7 +1086,7 @@ class EditStoredInput extends Action2 {
|
|
|
1086
1086
|
constructor() {
|
|
1087
1087
|
super({
|
|
1088
1088
|
id: McpCommandIds.EditStoredInput,
|
|
1089
|
-
title: ( localize2(
|
|
1089
|
+
title: ( localize2(13788, "Edit Stored Input")),
|
|
1090
1090
|
category,
|
|
1091
1091
|
f1: false
|
|
1092
1092
|
});
|
|
@@ -1100,7 +1100,7 @@ class SetOAuthClientSecret extends Action2 {
|
|
|
1100
1100
|
constructor() {
|
|
1101
1101
|
super({
|
|
1102
1102
|
id: McpCommandIds.SetOAuthClientSecret,
|
|
1103
|
-
title: ( localize2(
|
|
1103
|
+
title: ( localize2(13789, "Set OAuth Client Secret")),
|
|
1104
1104
|
category,
|
|
1105
1105
|
f1: false
|
|
1106
1106
|
});
|
|
@@ -1112,21 +1112,21 @@ class SetOAuthClientSecret extends Action2 {
|
|
|
1112
1112
|
const existing = await secretStorageService.get(key);
|
|
1113
1113
|
const deleteButton = {
|
|
1114
1114
|
iconClass: ThemeIcon.asClassName(Codicon.trash),
|
|
1115
|
-
tooltip: ( localize(
|
|
1115
|
+
tooltip: ( localize(13790, "Delete stored client secret"))
|
|
1116
1116
|
};
|
|
1117
1117
|
const revealButton = {
|
|
1118
1118
|
iconClass: ThemeIcon.asClassName(Codicon.eye),
|
|
1119
|
-
tooltip: ( localize(
|
|
1119
|
+
tooltip: ( localize(13791, "Show client secret"))
|
|
1120
1120
|
};
|
|
1121
1121
|
const hideButton = {
|
|
1122
1122
|
iconClass: ThemeIcon.asClassName(Codicon.eyeClosed),
|
|
1123
|
-
tooltip: ( localize(
|
|
1123
|
+
tooltip: ( localize(13792, "Hide client secret"))
|
|
1124
1124
|
};
|
|
1125
1125
|
const result = await ( new Promise(resolve => {
|
|
1126
1126
|
const input = quickInputService.createInputBox();
|
|
1127
|
-
input.title = existing ? ( localize(
|
|
1128
|
-
input.prompt = ( localize(
|
|
1129
|
-
input.placeholder = existing ? ( localize(
|
|
1127
|
+
input.title = existing ? ( localize(13793, "Replace Client Secret for {0}", serverName)) : ( localize(13794, "Set Client Secret for {0}", serverName));
|
|
1128
|
+
input.prompt = ( localize(13795, "Enter the client secret for OAuth client '{0}'.", clientId));
|
|
1129
|
+
input.placeholder = existing ? ( localize(13796, "Enter a new client secret to replace the stored value")) : ( localize(13797, "Enter client secret"));
|
|
1130
1130
|
input.password = true;
|
|
1131
1131
|
input.ignoreFocusOut = true;
|
|
1132
1132
|
if (existing) {
|
|
@@ -1186,7 +1186,7 @@ class ShowConfiguration extends Action2 {
|
|
|
1186
1186
|
constructor() {
|
|
1187
1187
|
super({
|
|
1188
1188
|
id: McpCommandIds.ShowConfiguration,
|
|
1189
|
-
title: ( localize2(
|
|
1189
|
+
title: ( localize2(13798, "Show Configuration")),
|
|
1190
1190
|
category,
|
|
1191
1191
|
f1: false
|
|
1192
1192
|
});
|
|
@@ -1216,7 +1216,7 @@ class ShowOutput extends Action2 {
|
|
|
1216
1216
|
constructor() {
|
|
1217
1217
|
super({
|
|
1218
1218
|
id: McpCommandIds.ShowOutput,
|
|
1219
|
-
title: ( localize2(
|
|
1219
|
+
title: ( localize2(13799, "Show Output")),
|
|
1220
1220
|
category,
|
|
1221
1221
|
f1: false
|
|
1222
1222
|
});
|
|
@@ -1235,7 +1235,7 @@ class RestartServer extends Action2 {
|
|
|
1235
1235
|
constructor() {
|
|
1236
1236
|
super({
|
|
1237
1237
|
id: McpCommandIds.RestartServer,
|
|
1238
|
-
title: ( localize2(
|
|
1238
|
+
title: ( localize2(13800, "Restart Server")),
|
|
1239
1239
|
category,
|
|
1240
1240
|
f1: false
|
|
1241
1241
|
});
|
|
@@ -1247,7 +1247,7 @@ class RestartServer extends Action2 {
|
|
|
1247
1247
|
`Restarting MCP server '${server?.name ?? serverId.serverId}' is not supported for agent-host servers`
|
|
1248
1248
|
);
|
|
1249
1249
|
accessor.get(INotificationService).warn(( localize(
|
|
1250
|
-
|
|
1250
|
+
13801,
|
|
1251
1251
|
"Restarting MCP server '{0}' is not supported for agent-host servers. Stop and start the server instead.",
|
|
1252
1252
|
server?.name ?? serverId.serverId
|
|
1253
1253
|
)));
|
|
@@ -1266,7 +1266,7 @@ class StartServer extends Action2 {
|
|
|
1266
1266
|
constructor() {
|
|
1267
1267
|
super({
|
|
1268
1268
|
id: McpCommandIds.StartServer,
|
|
1269
|
-
title: ( localize2(
|
|
1269
|
+
title: ( localize2(13802, "Start Server")),
|
|
1270
1270
|
category,
|
|
1271
1271
|
f1: false
|
|
1272
1272
|
});
|
|
@@ -1295,7 +1295,7 @@ class StopServer extends Action2 {
|
|
|
1295
1295
|
constructor() {
|
|
1296
1296
|
super({
|
|
1297
1297
|
id: McpCommandIds.StopServer,
|
|
1298
|
-
title: ( localize2(
|
|
1298
|
+
title: ( localize2(13803, "Stop Server")),
|
|
1299
1299
|
category,
|
|
1300
1300
|
f1: false
|
|
1301
1301
|
});
|
|
@@ -1313,8 +1313,8 @@ class McpBrowseCommand extends Action2 {
|
|
|
1313
1313
|
constructor() {
|
|
1314
1314
|
super({
|
|
1315
1315
|
id: McpCommandIds.Browse,
|
|
1316
|
-
title: ( localize2(
|
|
1317
|
-
tooltip: ( localize2(
|
|
1316
|
+
title: ( localize2(13804, "MCP Servers")),
|
|
1317
|
+
tooltip: ( localize2(13805, "Browse MCP Servers")),
|
|
1318
1318
|
category,
|
|
1319
1319
|
icon: Codicon.search,
|
|
1320
1320
|
precondition: ( ContextKeyExpr.and(( ChatContextKeys.Setup.hidden.negate()), ( ChatContextKeys.Setup.disabledInWorkspace.negate()))),
|
|
@@ -1337,7 +1337,7 @@ class McpBrowseCommand extends Action2 {
|
|
|
1337
1337
|
MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
|
|
1338
1338
|
command: {
|
|
1339
1339
|
id: McpCommandIds.Browse,
|
|
1340
|
-
title: ( localize2(
|
|
1340
|
+
title: ( localize2(13806, "Browse MCP Servers")),
|
|
1341
1341
|
category,
|
|
1342
1342
|
precondition: ( ContextKeyExpr.and(( ChatContextKeys.Setup.hidden.negate()), ( ChatContextKeys.Setup.disabledInWorkspace.negate())))
|
|
1343
1343
|
}
|
|
@@ -1346,7 +1346,7 @@ class ShowInstalledMcpServersCommand extends Action2 {
|
|
|
1346
1346
|
constructor() {
|
|
1347
1347
|
super({
|
|
1348
1348
|
id: McpCommandIds.ShowInstalled,
|
|
1349
|
-
title: ( localize2(
|
|
1349
|
+
title: ( localize2(13807, "Show Installed Servers")),
|
|
1350
1350
|
category,
|
|
1351
1351
|
precondition: ( ContextKeyExpr.and(HasInstalledMcpServersContext, ( ChatContextKeys.Setup.hidden.negate()), ( ChatContextKeys.Setup.disabledInWorkspace.negate()))),
|
|
1352
1352
|
f1: true
|
|
@@ -1380,7 +1380,7 @@ class OpenUserMcpResourceCommand extends OpenMcpResourceCommand {
|
|
|
1380
1380
|
constructor() {
|
|
1381
1381
|
super({
|
|
1382
1382
|
id: McpCommandIds.OpenUserMcp,
|
|
1383
|
-
title: ( localize2(
|
|
1383
|
+
title: ( localize2(13808, "Open User Configuration")),
|
|
1384
1384
|
category,
|
|
1385
1385
|
f1: true,
|
|
1386
1386
|
precondition: ( ContextKeyExpr.and(( ChatContextKeys.Setup.hidden.negate()), ( ChatContextKeys.Setup.disabledInWorkspace.negate())))
|
|
@@ -1395,7 +1395,7 @@ class OpenRemoteUserMcpResourceCommand extends OpenMcpResourceCommand {
|
|
|
1395
1395
|
constructor() {
|
|
1396
1396
|
super({
|
|
1397
1397
|
id: McpCommandIds.OpenRemoteUserMcp,
|
|
1398
|
-
title: ( localize2(
|
|
1398
|
+
title: ( localize2(13809, "Open Remote User Configuration")),
|
|
1399
1399
|
category,
|
|
1400
1400
|
f1: true,
|
|
1401
1401
|
precondition: ( ContextKeyExpr.and(( ContextKeyExpr.and(( ChatContextKeys.Setup.hidden.negate()), ( ChatContextKeys.Setup.disabledInWorkspace.negate()))), ( RemoteNameContext.notEqualsTo(""))))
|
|
@@ -1412,7 +1412,7 @@ class OpenWorkspaceFolderMcpResourceCommand extends Action2 {
|
|
|
1412
1412
|
constructor() {
|
|
1413
1413
|
super({
|
|
1414
1414
|
id: McpCommandIds.OpenWorkspaceFolderMcp,
|
|
1415
|
-
title: ( localize2(
|
|
1415
|
+
title: ( localize2(13810, "Open Workspace Folder MCP Configuration")),
|
|
1416
1416
|
category,
|
|
1417
1417
|
f1: true,
|
|
1418
1418
|
precondition: ( ContextKeyExpr.and(( ContextKeyExpr.and(( ChatContextKeys.Setup.hidden.negate()), ( ChatContextKeys.Setup.disabledInWorkspace.negate()))), ( WorkspaceFolderCountContext.notEqualsTo(0))))
|
|
@@ -1435,7 +1435,7 @@ class OpenWorkspaceMcpResourceCommand extends Action2 {
|
|
|
1435
1435
|
constructor() {
|
|
1436
1436
|
super({
|
|
1437
1437
|
id: McpCommandIds.OpenWorkspaceMcp,
|
|
1438
|
-
title: ( localize2(
|
|
1438
|
+
title: ( localize2(13811, "Open Workspace MCP Configuration")),
|
|
1439
1439
|
category,
|
|
1440
1440
|
f1: true,
|
|
1441
1441
|
precondition: ( ContextKeyExpr.and(( ContextKeyExpr.and(( ChatContextKeys.Setup.hidden.negate()), ( ChatContextKeys.Setup.disabledInWorkspace.negate()))), ( WorkbenchStateContext.isEqualTo("workspace"))))
|
|
@@ -1456,7 +1456,7 @@ class McpBrowseResourcesCommand extends Action2 {
|
|
|
1456
1456
|
constructor() {
|
|
1457
1457
|
super({
|
|
1458
1458
|
id: McpCommandIds.BrowseResources,
|
|
1459
|
-
title: ( localize2(
|
|
1459
|
+
title: ( localize2(13812, "Browse Resources...")),
|
|
1460
1460
|
category,
|
|
1461
1461
|
precondition: ( ContextKeyExpr.and(McpContextKeys.serverCount.greater(0), ( ChatContextKeys.Setup.hidden.negate()), ( ChatContextKeys.Setup.disabledInWorkspace.negate()))),
|
|
1462
1462
|
f1: true
|
|
@@ -1474,7 +1474,7 @@ class McpConfigureSamplingModels extends Action2 {
|
|
|
1474
1474
|
constructor() {
|
|
1475
1475
|
super({
|
|
1476
1476
|
id: McpCommandIds.ConfigureSamplingModels,
|
|
1477
|
-
title: ( localize2(
|
|
1477
|
+
title: ( localize2(13813, "Configure SamplingModel")),
|
|
1478
1478
|
category
|
|
1479
1479
|
});
|
|
1480
1480
|
}
|
|
@@ -1500,7 +1500,7 @@ class McpConfigureSamplingModels extends Action2 {
|
|
|
1500
1500
|
);
|
|
1501
1501
|
const picked = await quickInputService.pick(allItems, {
|
|
1502
1502
|
placeHolder: ( localize(
|
|
1503
|
-
|
|
1503
|
+
13814,
|
|
1504
1504
|
"Pick the models {0} can access via MCP sampling",
|
|
1505
1505
|
server.definition.label
|
|
1506
1506
|
)),
|
|
@@ -1516,7 +1516,7 @@ class McpStartPromptingServerCommand extends Action2 {
|
|
|
1516
1516
|
constructor() {
|
|
1517
1517
|
super({
|
|
1518
1518
|
id: McpCommandIds.StartPromptForServer,
|
|
1519
|
-
title: ( localize2(
|
|
1519
|
+
title: ( localize2(13815, "Start Prompting Server")),
|
|
1520
1520
|
category,
|
|
1521
1521
|
f1: false
|
|
1522
1522
|
});
|
|
@@ -1546,7 +1546,7 @@ class McpSkipCurrentAutostartCommand extends Action2 {
|
|
|
1546
1546
|
constructor() {
|
|
1547
1547
|
super({
|
|
1548
1548
|
id: McpCommandIds.SkipCurrentAutostart,
|
|
1549
|
-
title: ( localize2(
|
|
1549
|
+
title: ( localize2(13816, "Skip Current Autostart")),
|
|
1550
1550
|
category,
|
|
1551
1551
|
f1: false
|
|
1552
1552
|
});
|