@codingame/monaco-vscode-mcp-service-override 26.2.2 → 27.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/index.js +8 -2
- package/package.json +2 -2
- package/vscode/src/vs/base/common/jsonRpcProtocol.d.ts +66 -0
- package/vscode/src/vs/base/common/jsonRpcProtocol.js +216 -0
- package/vscode/src/vs/platform/mcp/common/allowedMcpServersService.js +1 -1
- package/vscode/src/vs/platform/mcp/common/mcpGalleryService.js +2 -2
- package/vscode/src/vs/platform/mcp/common/mcpGateway.d.ts +39 -0
- package/vscode/src/vs/platform/mcp/common/mcpGateway.js +6 -0
- package/vscode/src/vs/platform/mcp/common/mcpResourceScannerService.d.ts +2 -1
- package/vscode/src/vs/platform/mcp/common/mcpResourceScannerService.js +12 -6
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcp.contribution.js +15 -5
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpAddContextContribution.js +2 -2
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpCommands.js +58 -58
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpElicitationService.js +27 -28
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpGatewayService.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpGatewayService.js +34 -0
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpGatewayToolBrokerContribution.d.ts +6 -0
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpGatewayToolBrokerContribution.js +15 -0
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpLanguageFeatures.js +18 -18
- 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/mcpServersView.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServersView.js +42 -24
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpWorkbenchService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpWorkbenchService.js +13 -12
- package/vscode/src/vs/workbench/contrib/mcp/common/discovery/extensionMcpDiscovery.js +4 -4
- package/vscode/src/vs/workbench/contrib/mcp/common/discovery/installedMcpServersDiscovery.js +2 -0
- package/vscode/src/vs/workbench/contrib/mcp/common/discovery/nativeMcpDiscoveryAbstract.js +1 -1
- package/vscode/src/vs/workbench/contrib/mcp/common/discovery/pluginMcpDiscovery.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/mcp/common/discovery/pluginMcpDiscovery.js +106 -0
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpContextKeys.js +4 -4
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpGatewayToolBrokerChannel.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpGatewayToolBrokerChannel.js +202 -0
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpLanguageModelToolContribution.js +25 -17
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpRegistry.d.ts +3 -5
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpRegistry.js +27 -32
- 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.d.ts +34 -0
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpSandboxService.js +233 -0
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpServerConnection.js +3 -3
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpServerRequestHandler.d.ts +1 -18
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpServerRequestHandler.js +88 -142
- package/vscode/src/vs/workbench/services/authentication/browser/authenticationMcpService.js +9 -9
- package/vscode/src/vs/workbench/services/mcp/browser/mcpWorkbenchManagementService.d.ts +1 -1
- package/vscode/src/vs/workbench/services/mcp/browser/mcpWorkbenchManagementService.js +2 -2
- package/vscode/src/vs/platform/mcp/common/mcpManagementIpc.d.ts +0 -42
- package/vscode/src/vs/platform/mcp/common/mcpManagementIpc.js +0 -105
- package/vscode/src/vs/platform/mcp/common/mcpManagementService.d.ts +0 -130
- package/vscode/src/vs/platform/mcp/common/mcpManagementService.js +0 -665
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerActions.d.ts +0 -259
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerActions.js +0 -1225
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerEditor.d.ts +0 -72
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerEditor.js +0 -996
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerEditorInput.d.ts +0 -17
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerEditorInput.js +0 -49
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerIcons.d.ts +0 -5
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerIcons.js +0 -12
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerWidgets.d.ts +0 -88
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerWidgets.js +0 -464
- package/vscode/src/vs/workbench/contrib/mcp/browser/media/mcpServerEditor.css +0 -94
- package/vscode/src/vs/workbench/services/mcp/common/mcpWorkbenchManagementService.d.ts +0 -87
- package/vscode/src/vs/workbench/services/mcp/common/mcpWorkbenchManagementService.js +0 -702
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { IWorkbenchContribution } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions";
|
|
2
|
+
import { IRemoteAgentService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/remote/common/remoteAgentService.service";
|
|
3
|
+
import { IMcpService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpTypes.service";
|
|
4
|
+
export declare class McpGatewayToolBrokerContribution implements IWorkbenchContribution {
|
|
5
|
+
constructor(remoteAgentService: IRemoteAgentService, mcpService: IMcpService);
|
|
6
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { McpGatewayToolBrokerChannelName } from '../../../../platform/mcp/common/mcpGateway.js';
|
|
4
|
+
import { IRemoteAgentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/remote/common/remoteAgentService.service';
|
|
5
|
+
import { IMcpService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpTypes.service';
|
|
6
|
+
import { McpGatewayToolBrokerChannel } from '../common/mcpGatewayToolBrokerChannel.js';
|
|
7
|
+
|
|
8
|
+
let McpGatewayToolBrokerContribution = class McpGatewayToolBrokerContribution {
|
|
9
|
+
constructor(remoteAgentService, mcpService) {
|
|
10
|
+
remoteAgentService.getConnection()?.registerChannel(McpGatewayToolBrokerChannelName, ( new McpGatewayToolBrokerChannel(mcpService)));
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
McpGatewayToolBrokerContribution = ( __decorate([( __param(0, IRemoteAgentService)), ( __param(1, IMcpService))], McpGatewayToolBrokerContribution));
|
|
14
|
+
|
|
15
|
+
export { McpGatewayToolBrokerContribution };
|
|
@@ -115,7 +115,7 @@ let McpLanguageFeatures = class McpLanguageFeatures extends Disposable {
|
|
|
115
115
|
diagnostics.push({
|
|
116
116
|
severity: MarkerSeverity.Warning,
|
|
117
117
|
message: ( localize(
|
|
118
|
-
|
|
118
|
+
10058,
|
|
119
119
|
"Variable `{0}` not found, did you mean ${{1}}?",
|
|
120
120
|
name,
|
|
121
121
|
getClosestMatchingVariable(name) + (arg ? `:${arg}` : "")
|
|
@@ -181,14 +181,14 @@ let McpLanguageFeatures = class McpLanguageFeatures extends Disposable {
|
|
|
181
181
|
range,
|
|
182
182
|
command: {
|
|
183
183
|
id: McpCommandIds.ShowOutput,
|
|
184
|
-
title: "$(error) " + ( localize(
|
|
184
|
+
title: "$(error) " + ( localize(10059, "Error")),
|
|
185
185
|
arguments: [server.definition.id]
|
|
186
186
|
}
|
|
187
187
|
}, {
|
|
188
188
|
range,
|
|
189
189
|
command: {
|
|
190
190
|
id: McpCommandIds.RestartServer,
|
|
191
|
-
title: ( localize(
|
|
191
|
+
title: ( localize(10060, "Restart")),
|
|
192
192
|
arguments: [server.definition.id, {
|
|
193
193
|
autoTrustChanges: true
|
|
194
194
|
}]
|
|
@@ -199,7 +199,7 @@ let McpLanguageFeatures = class McpLanguageFeatures extends Disposable {
|
|
|
199
199
|
range,
|
|
200
200
|
command: {
|
|
201
201
|
id: McpCommandIds.RestartServer,
|
|
202
|
-
title: ( localize(
|
|
202
|
+
title: ( localize(10061, "Debug")),
|
|
203
203
|
arguments: [server.definition.id, {
|
|
204
204
|
debug: true,
|
|
205
205
|
autoTrustChanges: true
|
|
@@ -213,14 +213,14 @@ let McpLanguageFeatures = class McpLanguageFeatures extends Disposable {
|
|
|
213
213
|
range,
|
|
214
214
|
command: {
|
|
215
215
|
id: McpCommandIds.ShowOutput,
|
|
216
|
-
title: "$(loading~spin) " + ( localize(
|
|
216
|
+
title: "$(loading~spin) " + ( localize(10062, "Starting")),
|
|
217
217
|
arguments: [server.definition.id]
|
|
218
218
|
}
|
|
219
219
|
}, {
|
|
220
220
|
range,
|
|
221
221
|
command: {
|
|
222
222
|
id: McpCommandIds.StopServer,
|
|
223
|
-
title: ( localize(
|
|
223
|
+
title: ( localize(10063, "Cancel")),
|
|
224
224
|
arguments: [server.definition.id]
|
|
225
225
|
}
|
|
226
226
|
});
|
|
@@ -230,21 +230,21 @@ let McpLanguageFeatures = class McpLanguageFeatures extends Disposable {
|
|
|
230
230
|
range,
|
|
231
231
|
command: {
|
|
232
232
|
id: McpCommandIds.ShowOutput,
|
|
233
|
-
title: "$(check) " + ( localize(
|
|
233
|
+
title: "$(check) " + ( localize(10064, "Running")),
|
|
234
234
|
arguments: [server.definition.id]
|
|
235
235
|
}
|
|
236
236
|
}, {
|
|
237
237
|
range,
|
|
238
238
|
command: {
|
|
239
239
|
id: McpCommandIds.StopServer,
|
|
240
|
-
title: ( localize(
|
|
240
|
+
title: ( localize(10065, "Stop")),
|
|
241
241
|
arguments: [server.definition.id]
|
|
242
242
|
}
|
|
243
243
|
}, {
|
|
244
244
|
range,
|
|
245
245
|
command: {
|
|
246
246
|
id: McpCommandIds.RestartServer,
|
|
247
|
-
title: ( localize(
|
|
247
|
+
title: ( localize(10060, "Restart")),
|
|
248
248
|
arguments: [server.definition.id, {
|
|
249
249
|
autoTrustChanges: true
|
|
250
250
|
}]
|
|
@@ -255,7 +255,7 @@ let McpLanguageFeatures = class McpLanguageFeatures extends Disposable {
|
|
|
255
255
|
range,
|
|
256
256
|
command: {
|
|
257
257
|
id: McpCommandIds.RestartServer,
|
|
258
|
-
title: ( localize(
|
|
258
|
+
title: ( localize(10061, "Debug")),
|
|
259
259
|
arguments: [server.definition.id, {
|
|
260
260
|
autoTrustChanges: true,
|
|
261
261
|
debug: true
|
|
@@ -269,7 +269,7 @@ let McpLanguageFeatures = class McpLanguageFeatures extends Disposable {
|
|
|
269
269
|
range,
|
|
270
270
|
command: {
|
|
271
271
|
id: McpCommandIds.StartServer,
|
|
272
|
-
title: "$(debug-start) " + ( localize(
|
|
272
|
+
title: "$(debug-start) " + ( localize(10066, "Start")),
|
|
273
273
|
arguments: [server.definition.id, {
|
|
274
274
|
autoTrustChanges: true
|
|
275
275
|
}]
|
|
@@ -280,7 +280,7 @@ let McpLanguageFeatures = class McpLanguageFeatures extends Disposable {
|
|
|
280
280
|
range,
|
|
281
281
|
command: {
|
|
282
282
|
id: McpCommandIds.StartServer,
|
|
283
|
-
title: ( localize(
|
|
283
|
+
title: ( localize(10061, "Debug")),
|
|
284
284
|
arguments: [server.definition.id, {
|
|
285
285
|
autoTrustChanges: true,
|
|
286
286
|
debug: true
|
|
@@ -296,7 +296,7 @@ let McpLanguageFeatures = class McpLanguageFeatures extends Disposable {
|
|
|
296
296
|
range,
|
|
297
297
|
command: {
|
|
298
298
|
id: "",
|
|
299
|
-
title: ( localize(
|
|
299
|
+
title: ( localize(10067, "{0} tools", toolCount))
|
|
300
300
|
}
|
|
301
301
|
});
|
|
302
302
|
}
|
|
@@ -306,7 +306,7 @@ let McpLanguageFeatures = class McpLanguageFeatures extends Disposable {
|
|
|
306
306
|
range,
|
|
307
307
|
command: {
|
|
308
308
|
id: McpCommandIds.StartPromptForServer,
|
|
309
|
-
title: ( localize(
|
|
309
|
+
title: ( localize(10068, "{0} prompts", promptCount)),
|
|
310
310
|
arguments: [server]
|
|
311
311
|
}
|
|
312
312
|
});
|
|
@@ -315,7 +315,7 @@ let McpLanguageFeatures = class McpLanguageFeatures extends Disposable {
|
|
|
315
315
|
range,
|
|
316
316
|
command: {
|
|
317
317
|
id: McpCommandIds.ServerOptions,
|
|
318
|
-
title: ( localize(
|
|
318
|
+
title: ( localize(10069, "More...")),
|
|
319
319
|
arguments: [server.definition.id]
|
|
320
320
|
}
|
|
321
321
|
});
|
|
@@ -390,15 +390,15 @@ let McpLanguageFeatures = class McpLanguageFeatures extends Disposable {
|
|
|
390
390
|
function pushAnnotation(savedId, offset, saved) {
|
|
391
391
|
const tooltip = ( new MarkdownString([createMarkdownCommandLink({
|
|
392
392
|
id: McpCommandIds.EditStoredInput,
|
|
393
|
-
title: ( localize(
|
|
393
|
+
title: ( localize(10070, "Edit")),
|
|
394
394
|
arguments: [savedId, model.uri, mcpConfigurationSection, inConfig.target]
|
|
395
395
|
}), createMarkdownCommandLink({
|
|
396
396
|
id: McpCommandIds.RemoveStoredInput,
|
|
397
|
-
title: ( localize(
|
|
397
|
+
title: ( localize(10071, "Clear")),
|
|
398
398
|
arguments: [inConfig.scope, savedId]
|
|
399
399
|
}), createMarkdownCommandLink({
|
|
400
400
|
id: McpCommandIds.RemoveStoredInput,
|
|
401
|
-
title: ( localize(
|
|
401
|
+
title: ( localize(10072, "Clear All")),
|
|
402
402
|
arguments: [inConfig.scope]
|
|
403
403
|
})].join(" | "), {
|
|
404
404
|
isTrusted: true
|
|
@@ -98,16 +98,16 @@ let McpConfigMigrationContribution = class McpConfigMigrationContribution extend
|
|
|
98
98
|
}
|
|
99
99
|
showMcpConfigErrorNotification(isRemote) {
|
|
100
100
|
const message = isRemote ? ( localize(
|
|
101
|
-
|
|
101
|
+
10073,
|
|
102
102
|
"MCP servers should no longer be configured in remote user settings. Use the dedicated MCP configuration instead."
|
|
103
103
|
)) : ( localize(
|
|
104
|
-
|
|
104
|
+
10074,
|
|
105
105
|
"MCP servers should no longer be configured in user settings. Use the dedicated MCP configuration instead."
|
|
106
106
|
));
|
|
107
|
-
const openConfigLabel = isRemote ? ( localize(
|
|
107
|
+
const openConfigLabel = isRemote ? ( localize(10075, "Open Remote User MCP Configuration")) : ( localize(10076, "Open User MCP Configuration"));
|
|
108
108
|
const commandId = isRemote ? McpCommandIds.OpenRemoteUserMcp : McpCommandIds.OpenUserMcp;
|
|
109
109
|
this.notificationService.prompt(Severity.Error, message, [{
|
|
110
|
-
label: ( localize(
|
|
110
|
+
label: ( localize(10077, "Update Now")),
|
|
111
111
|
run: async () => {
|
|
112
112
|
await this.migrateMcpConfig();
|
|
113
113
|
await this.commandService.executeCommand(commandId);
|
|
@@ -74,7 +74,7 @@ let McpResourcePickHelper = class McpResourcePickHelper extends Disposable {
|
|
|
74
74
|
id: resource.template.template,
|
|
75
75
|
label: resource.title || resource.name,
|
|
76
76
|
description: resource.description,
|
|
77
|
-
detail: ( localize(
|
|
77
|
+
detail: ( localize(10093, "Resource template: {0}", resource.template.template)),
|
|
78
78
|
iconPath
|
|
79
79
|
};
|
|
80
80
|
}
|
|
@@ -221,7 +221,7 @@ let McpResourcePickHelper = class McpResourcePickHelper extends Disposable {
|
|
|
221
221
|
return uri;
|
|
222
222
|
}
|
|
223
223
|
this._notificationService.warn(( localize(
|
|
224
|
-
|
|
224
|
+
10094,
|
|
225
225
|
"The resource {0} was not found.",
|
|
226
226
|
(McpResourceURI.toServer(uri).resourceURL.toString())
|
|
227
227
|
)));
|
|
@@ -266,13 +266,13 @@ let McpResourcePickHelper = class McpResourcePickHelper extends Disposable {
|
|
|
266
266
|
}
|
|
267
267
|
}
|
|
268
268
|
let placeholder = ( localize(
|
|
269
|
-
|
|
269
|
+
10095,
|
|
270
270
|
"Value for ${0} in {1}",
|
|
271
271
|
variable.name.toUpperCase(),
|
|
272
272
|
rt.template.resolve(variablesWithPlaceholders).replaceAll("%24", "$")
|
|
273
273
|
));
|
|
274
274
|
if (variable.optional) {
|
|
275
|
-
placeholder += " (" + ( localize(
|
|
275
|
+
placeholder += " (" + ( localize(10096, "Optional")) + ")";
|
|
276
276
|
}
|
|
277
277
|
input.placeholder = placeholder;
|
|
278
278
|
input.value = "";
|
|
@@ -292,7 +292,7 @@ let McpResourcePickHelper = class McpResourcePickHelper extends Disposable {
|
|
|
292
292
|
} else if (variable.optional) {
|
|
293
293
|
items.unshift({
|
|
294
294
|
id: currentID,
|
|
295
|
-
label: ( localize(
|
|
295
|
+
label: ( localize(10097, "<Empty>"))
|
|
296
296
|
});
|
|
297
297
|
}
|
|
298
298
|
input.items = items;
|
|
@@ -463,7 +463,7 @@ let AbstractMcpResourceAccessPick = class AbstractMcpResourceAccessPick {
|
|
|
463
463
|
picker.keepScrollPosition = true;
|
|
464
464
|
const store = ( new DisposableStore());
|
|
465
465
|
const goBackId = "_goback_";
|
|
466
|
-
const attachButton = ( localize(
|
|
466
|
+
const attachButton = ( localize(10098, "Attach to chat"));
|
|
467
467
|
const helper = store.add(this._instantiationService.createInstance(McpResourcePickHelper));
|
|
468
468
|
if (this._scopeTo) {
|
|
469
469
|
helper.explicitServers = [this._scopeTo];
|
|
@@ -491,7 +491,7 @@ let AbstractMcpResourceAccessPick = class AbstractMcpResourceAccessPick {
|
|
|
491
491
|
if (helper.checkIfNestedResources()) {
|
|
492
492
|
const goBackItem = {
|
|
493
493
|
id: goBackId,
|
|
494
|
-
label: ( localize(
|
|
494
|
+
label: ( localize(10099, "Go back ↩")),
|
|
495
495
|
alwaysShow: true
|
|
496
496
|
};
|
|
497
497
|
items.push(goBackItem);
|
|
@@ -573,7 +573,7 @@ let McpResourceQuickPick = class McpResourceQuickPick extends AbstractMcpResourc
|
|
|
573
573
|
const qp = store.add(this._quickInputService.createQuickPick({
|
|
574
574
|
useSeparators: true
|
|
575
575
|
}));
|
|
576
|
-
qp.placeholder = ( localize(
|
|
576
|
+
qp.placeholder = ( localize(10100, "Search for resources"));
|
|
577
577
|
store.add(this.applyToPick(qp, token));
|
|
578
578
|
store.add(qp.onDidHide(() => store.dispose()));
|
|
579
579
|
qp.show();
|
|
@@ -18,6 +18,7 @@ import { AbstractExtensionsListView } from "@codingame/monaco-vscode-api/vscode/
|
|
|
18
18
|
import { IWorkbenchLayoutService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/layout/browser/layoutService.service";
|
|
19
19
|
import { IMcpGalleryManifestService } from "@codingame/monaco-vscode-api/vscode/vs/platform/mcp/common/mcpGalleryManifest.service";
|
|
20
20
|
import { IMarkdownRendererService } from "@codingame/monaco-vscode-api/vscode/vs/platform/markdown/browser/markdownRenderer.service";
|
|
21
|
+
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
21
22
|
export interface McpServerListViewOptions {
|
|
22
23
|
showWelcome?: boolean;
|
|
23
24
|
}
|
|
@@ -28,13 +29,15 @@ export declare class McpServersListView extends AbstractExtensionsListView<IWork
|
|
|
28
29
|
protected readonly mcpGalleryManifestService: IMcpGalleryManifestService;
|
|
29
30
|
private readonly layoutService;
|
|
30
31
|
protected readonly markdownRendererService: IMarkdownRendererService;
|
|
32
|
+
private readonly logService;
|
|
31
33
|
private list;
|
|
32
34
|
private listContainer;
|
|
33
35
|
private welcomeContainer;
|
|
34
36
|
private bodyTemplate;
|
|
35
37
|
private readonly contextMenuActionRunner;
|
|
38
|
+
private readonly modalNavigationDisposable;
|
|
36
39
|
private input;
|
|
37
|
-
constructor(mpcViewOptions: McpServerListViewOptions, options: IViewletViewOptions, keybindingService: IKeybindingService, contextMenuService: IContextMenuService, instantiationService: IInstantiationService, themeService: IThemeService, hoverService: IHoverService, configurationService: IConfigurationService, contextKeyService: IContextKeyService, viewDescriptorService: IViewDescriptorService, openerService: IOpenerService, dialogService: IDialogService, mcpWorkbenchService: IMcpWorkbenchService, mcpGalleryManifestService: IMcpGalleryManifestService, layoutService: IWorkbenchLayoutService, markdownRendererService: IMarkdownRendererService);
|
|
40
|
+
constructor(mpcViewOptions: McpServerListViewOptions, options: IViewletViewOptions, keybindingService: IKeybindingService, contextMenuService: IContextMenuService, instantiationService: IInstantiationService, themeService: IThemeService, hoverService: IHoverService, configurationService: IConfigurationService, contextKeyService: IContextKeyService, viewDescriptorService: IViewDescriptorService, openerService: IOpenerService, dialogService: IDialogService, mcpWorkbenchService: IMcpWorkbenchService, mcpGalleryManifestService: IMcpGalleryManifestService, layoutService: IWorkbenchLayoutService, markdownRendererService: IMarkdownRendererService, logService: ILogService);
|
|
38
41
|
protected renderBody(container: HTMLElement): void;
|
|
39
42
|
private onContextMenu;
|
|
40
43
|
protected layoutBody(height: number, width: number): void;
|
|
@@ -6,7 +6,7 @@ import { append, $ } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/d
|
|
|
6
6
|
import { ActionBar } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/actionbar/actionbar';
|
|
7
7
|
import { Event, Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
8
8
|
import { createMarkdownCommandLink, MarkdownString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent';
|
|
9
|
-
import { DisposableStore, isDisposable, combinedDisposable, dispose, Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
9
|
+
import { MutableDisposable, DisposableStore, isDisposable, combinedDisposable, dispose, Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
10
10
|
import { PagedModel, DelayedPagedModel, IterativePagedModel } from '@codingame/monaco-vscode-api/vscode/vs/base/common/paging';
|
|
11
11
|
import { localize, localize2 } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
12
12
|
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
@@ -26,8 +26,8 @@ import { ViewContainerLocation, Extensions } from '@codingame/monaco-vscode-api/
|
|
|
26
26
|
import { IViewDescriptorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/views.service';
|
|
27
27
|
import { McpServerContainers, McpServerEnablementState, InstalledMcpServersViewId, HasInstalledMcpServersContext, McpServersGalleryStatusContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpTypes';
|
|
28
28
|
import { IMcpWorkbenchService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpTypes.service';
|
|
29
|
-
import { getContextMenuActions, DropDownAction, McpServerStatusAction, InstallAction, InstallingLabelAction, ManageMcpServerAction } from '
|
|
30
|
-
import { McpServerIconWidget, PublisherWidget, StarredWidget, McpServerScopeBadgeWidget, McpServerHoverWidget } from '
|
|
29
|
+
import { getContextMenuActions, DropDownAction, McpServerStatusAction, InstallAction, InstallingLabelAction, ManageMcpServerAction } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/browser/mcpServerActions';
|
|
30
|
+
import { McpServerIconWidget, PublisherWidget, StarredWidget, McpServerScopeBadgeWidget, McpServerHoverWidget } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/browser/mcpServerWidgets';
|
|
31
31
|
import { ActionRunner, Separator } from '@codingame/monaco-vscode-api/vscode/vs/base/common/actions';
|
|
32
32
|
import { mcpGalleryServiceEnablementConfig, mcpGalleryServiceUrlConfig } from '@codingame/monaco-vscode-api/vscode/vs/platform/mcp/common/mcpManagement';
|
|
33
33
|
import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
|
|
@@ -43,12 +43,14 @@ import { AbstractExtensionsListView } from '@codingame/monaco-vscode-api/vscode/
|
|
|
43
43
|
import { HoverPosition } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/hover/hoverWidget';
|
|
44
44
|
import { Position } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/layout/browser/layoutService';
|
|
45
45
|
import { IWorkbenchLayoutService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/layout/browser/layoutService.service';
|
|
46
|
-
import { mcpServerIcon } from '
|
|
46
|
+
import { mcpServerIcon } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/browser/mcpServerIcons';
|
|
47
47
|
import { McpGalleryManifestStatus } from '@codingame/monaco-vscode-api/vscode/vs/platform/mcp/common/mcpGalleryManifest';
|
|
48
48
|
import { IMcpGalleryManifestService } from '@codingame/monaco-vscode-api/vscode/vs/platform/mcp/common/mcpGalleryManifest.service';
|
|
49
49
|
import { ProductQualityContext } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkeys';
|
|
50
50
|
import { SeverityIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/severityIcon/severityIcon';
|
|
51
51
|
import { IMarkdownRendererService } from '@codingame/monaco-vscode-api/vscode/vs/platform/markdown/browser/markdownRenderer.service';
|
|
52
|
+
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
53
|
+
import { buildModalNavigationForPagedList } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/extensions/browser/extensionsViewer';
|
|
52
54
|
|
|
53
55
|
var McpServerRenderer_1;
|
|
54
56
|
registerCss(mcpServersView);
|
|
@@ -69,7 +71,8 @@ let McpServersListView = class McpServersListView extends AbstractExtensionsList
|
|
|
69
71
|
mcpWorkbenchService,
|
|
70
72
|
mcpGalleryManifestService,
|
|
71
73
|
layoutService,
|
|
72
|
-
markdownRendererService
|
|
74
|
+
markdownRendererService,
|
|
75
|
+
logService
|
|
73
76
|
) {
|
|
74
77
|
super(
|
|
75
78
|
options,
|
|
@@ -89,10 +92,12 @@ let McpServersListView = class McpServersListView extends AbstractExtensionsList
|
|
|
89
92
|
this.mcpGalleryManifestService = mcpGalleryManifestService;
|
|
90
93
|
this.layoutService = layoutService;
|
|
91
94
|
this.markdownRendererService = markdownRendererService;
|
|
95
|
+
this.logService = logService;
|
|
92
96
|
this.list = null;
|
|
93
97
|
this.listContainer = null;
|
|
94
98
|
this.welcomeContainer = null;
|
|
95
99
|
this.contextMenuActionRunner = this._register(( new ActionRunner()));
|
|
100
|
+
this.modalNavigationDisposable = this._register(( new MutableDisposable()));
|
|
96
101
|
}
|
|
97
102
|
renderBody(container) {
|
|
98
103
|
super.renderBody(container);
|
|
@@ -137,7 +142,7 @@ let McpServersListView = class McpServersListView extends AbstractExtensionsList
|
|
|
137
142
|
return mcpServer?.label ?? "";
|
|
138
143
|
},
|
|
139
144
|
getWidgetAriaLabel() {
|
|
140
|
-
return localize(
|
|
145
|
+
return localize(10170, "MCP Servers");
|
|
141
146
|
}
|
|
142
147
|
},
|
|
143
148
|
overrideStyles: getLocationBasedViewColors(this.viewDescriptorService.getViewLocationById(this.id)).listOverrideStyles,
|
|
@@ -150,7 +155,20 @@ let McpServersListView = class McpServersListView extends AbstractExtensionsList
|
|
|
150
155
|
75,
|
|
151
156
|
true
|
|
152
157
|
)(options => {
|
|
153
|
-
this.mcpWorkbenchService.open(options.element,
|
|
158
|
+
this.mcpWorkbenchService.open(options.element, {
|
|
159
|
+
...options.editorOptions,
|
|
160
|
+
modal: options.sideBySide ? undefined : buildModalNavigationForPagedList(
|
|
161
|
+
options.element,
|
|
162
|
+
() => this.list?.model,
|
|
163
|
+
(serverA, serverB) => serverA.id === serverB.id,
|
|
164
|
+
(server, modal) => this.mcpWorkbenchService.open(server, {
|
|
165
|
+
pinned: false,
|
|
166
|
+
modal
|
|
167
|
+
}),
|
|
168
|
+
this.modalNavigationDisposable,
|
|
169
|
+
this.logService
|
|
170
|
+
)
|
|
171
|
+
});
|
|
154
172
|
}));
|
|
155
173
|
this._register(this.list.onContextMenu(e => this.onContextMenu(e), this));
|
|
156
174
|
if (this.input) {
|
|
@@ -233,43 +251,43 @@ let McpServersListView = class McpServersListView extends AbstractExtensionsList
|
|
|
233
251
|
const iconElement = append(iconContainer, $("span"));
|
|
234
252
|
iconElement.className = ThemeIcon.asClassName(mcpServerIcon);
|
|
235
253
|
const title = append(welcomeContent, $(".mcp-welcome-title"));
|
|
236
|
-
title.textContent = ( localize(
|
|
254
|
+
title.textContent = ( localize(10171, "MCP Servers"));
|
|
237
255
|
const settingsCommandLink = ( createMarkdownCommandLink({
|
|
238
256
|
id: "workbench.action.openSettings",
|
|
239
257
|
arguments: [`@id:${mcpGalleryServiceEnablementConfig}`],
|
|
240
258
|
title: mcpGalleryServiceEnablementConfig,
|
|
241
|
-
tooltip: ( localize(
|
|
259
|
+
tooltip: ( localize(10172, "Open Settings"))
|
|
242
260
|
}).toString());
|
|
243
261
|
const description = append(welcomeContent, $(".mcp-welcome-description"));
|
|
244
262
|
const markdownResult = this._register(this.markdownRendererService.render(( new MarkdownString(( localize(
|
|
245
|
-
|
|
263
|
+
10173,
|
|
246
264
|
"Browse and install [Model Context Protocol (MCP) servers](https://code.visualstudio.com/docs/copilot/customization/mcp-servers) directly from VS Code to extend agent mode with extra tools for connecting to databases, invoking APIs and performing specialized tasks."
|
|
247
265
|
)), {
|
|
248
266
|
isTrusted: {
|
|
249
267
|
enabledCommands: ["workbench.action.openSettings"]
|
|
250
268
|
}
|
|
251
269
|
})).appendMarkdown("\n\n").appendMarkdown(( localize(
|
|
252
|
-
|
|
270
|
+
10174,
|
|
253
271
|
"This feature is currently in preview. You can disable it anytime using the setting {0}.",
|
|
254
272
|
settingsCommandLink
|
|
255
273
|
)))));
|
|
256
274
|
description.appendChild(markdownResult.element);
|
|
257
275
|
const buttonContainer = append(welcomeContent, $(".mcp-welcome-button-container"));
|
|
258
276
|
const button = this._register(( new Button(buttonContainer, {
|
|
259
|
-
title: ( localize(
|
|
277
|
+
title: ( localize(10175, "Enable MCP Servers Marketplace")),
|
|
260
278
|
...defaultButtonStyles
|
|
261
279
|
})));
|
|
262
|
-
button.label = ( localize(
|
|
280
|
+
button.label = ( localize(10175, "Enable MCP Servers Marketplace"));
|
|
263
281
|
this._register(button.onDidClick(async () => {
|
|
264
282
|
const {
|
|
265
283
|
result
|
|
266
284
|
} = await this.dialogService.prompt({
|
|
267
285
|
type: "info",
|
|
268
|
-
message: ( localize(
|
|
286
|
+
message: ( localize(10176, "Enable MCP Servers Marketplace?")),
|
|
269
287
|
custom: {
|
|
270
288
|
markdownDetails: [{
|
|
271
289
|
markdown: ( new MarkdownString(( localize(
|
|
272
|
-
|
|
290
|
+
10174,
|
|
273
291
|
"This feature is currently in preview. You can disable it anytime using the setting {0}.",
|
|
274
292
|
settingsCommandLink
|
|
275
293
|
)), {
|
|
@@ -278,10 +296,10 @@ let McpServersListView = class McpServersListView extends AbstractExtensionsList
|
|
|
278
296
|
}]
|
|
279
297
|
},
|
|
280
298
|
buttons: [{
|
|
281
|
-
label: ( localize(
|
|
299
|
+
label: ( localize(10177, "Enable")),
|
|
282
300
|
run: () => true
|
|
283
301
|
}, {
|
|
284
|
-
label: ( localize(
|
|
302
|
+
label: ( localize(10178, "Cancel")),
|
|
285
303
|
run: () => false
|
|
286
304
|
}]
|
|
287
305
|
});
|
|
@@ -301,7 +319,7 @@ let McpServersListView = class McpServersListView extends AbstractExtensionsList
|
|
|
301
319
|
this.bodyTemplate.messageBox.textContent = message.text;
|
|
302
320
|
} else if (count === 0) {
|
|
303
321
|
this.bodyTemplate.messageSeverityIcon.className = "";
|
|
304
|
-
this.bodyTemplate.messageBox.textContent = ( localize(
|
|
322
|
+
this.bodyTemplate.messageBox.textContent = ( localize(10179, "No MCP Servers found."));
|
|
305
323
|
}
|
|
306
324
|
if (this.bodyTemplate.messageBox.textContent) {
|
|
307
325
|
alert(this.bodyTemplate.messageBox.textContent);
|
|
@@ -381,7 +399,7 @@ let McpServersListView = class McpServersListView extends AbstractExtensionsList
|
|
|
381
399
|
return hasChanged ? mcpServers : undefined;
|
|
382
400
|
}
|
|
383
401
|
};
|
|
384
|
-
McpServersListView = ( __decorate([( __param(2, IKeybindingService)), ( __param(3, IContextMenuService)), ( __param(4, IInstantiationService)), ( __param(5, IThemeService)), ( __param(6, IHoverService)), ( __param(7, IConfigurationService)), ( __param(8, IContextKeyService)), ( __param(9, IViewDescriptorService)), ( __param(10, IOpenerService)), ( __param(11, IDialogService)), ( __param(12, IMcpWorkbenchService)), ( __param(13, IMcpGalleryManifestService)), ( __param(14, IWorkbenchLayoutService)), ( __param(15, IMarkdownRendererService))], McpServersListView));
|
|
402
|
+
McpServersListView = ( __decorate([( __param(2, IKeybindingService)), ( __param(3, IContextMenuService)), ( __param(4, IInstantiationService)), ( __param(5, IThemeService)), ( __param(6, IHoverService)), ( __param(7, IConfigurationService)), ( __param(8, IContextKeyService)), ( __param(9, IViewDescriptorService)), ( __param(10, IOpenerService)), ( __param(11, IDialogService)), ( __param(12, IMcpWorkbenchService)), ( __param(13, IMcpGalleryManifestService)), ( __param(14, IWorkbenchLayoutService)), ( __param(15, IMarkdownRendererService)), ( __param(16, ILogService))], McpServersListView));
|
|
385
403
|
let McpServerRenderer = class McpServerRenderer {
|
|
386
404
|
static {
|
|
387
405
|
McpServerRenderer_1 = this;
|
|
@@ -515,7 +533,7 @@ class McpServersViewsContribution extends Disposable {
|
|
|
515
533
|
super();
|
|
516
534
|
( Registry.as(Extensions.ViewsRegistry)).registerViews([{
|
|
517
535
|
id: InstalledMcpServersViewId,
|
|
518
|
-
name: ( localize2(
|
|
536
|
+
name: ( localize2(10180, "MCP Servers - Installed")),
|
|
519
537
|
ctorDescriptor: ( new SyncDescriptor(McpServersListView, [{}])),
|
|
520
538
|
when: ( ContextKeyExpr.and(DefaultViewsContext, HasInstalledMcpServersContext, ( ChatContextKeys.Setup.hidden.negate()))),
|
|
521
539
|
weight: 40,
|
|
@@ -523,7 +541,7 @@ class McpServersViewsContribution extends Disposable {
|
|
|
523
541
|
canToggleVisibility: true
|
|
524
542
|
}, {
|
|
525
543
|
id: "workbench.views.mcp.default.marketplace",
|
|
526
|
-
name: ( localize2(
|
|
544
|
+
name: ( localize2(10181, "MCP Servers")),
|
|
527
545
|
ctorDescriptor: ( new SyncDescriptor(DefaultBrowseMcpServersView, [{}])),
|
|
528
546
|
when: ( ContextKeyExpr.and(DefaultViewsContext, ( HasInstalledMcpServersContext.toNegated()), ( ChatContextKeys.Setup.hidden.negate()), ( McpServersGalleryStatusContext.isEqualTo(McpGalleryManifestStatus.Available)), ( ContextKeyExpr.or(( ContextKeyDefinedExpr.create(`config.${mcpGalleryServiceUrlConfig}`)), ( ProductQualityContext.notEqualsTo("stable")), ( ContextKeyDefinedExpr.create(`config.${mcpGalleryServiceEnablementConfig}`)))))),
|
|
529
547
|
weight: 40,
|
|
@@ -531,12 +549,12 @@ class McpServersViewsContribution extends Disposable {
|
|
|
531
549
|
canToggleVisibility: true
|
|
532
550
|
}, {
|
|
533
551
|
id: "workbench.views.mcp.marketplace",
|
|
534
|
-
name: ( localize2(
|
|
552
|
+
name: ( localize2(10181, "MCP Servers")),
|
|
535
553
|
ctorDescriptor: ( new SyncDescriptor(McpServersListView, [{}])),
|
|
536
554
|
when: ( ContextKeyExpr.and(SearchMcpServersContext, ( ChatContextKeys.Setup.hidden.negate()), ( McpServersGalleryStatusContext.isEqualTo(McpGalleryManifestStatus.Available)), ( ContextKeyExpr.or(( ContextKeyDefinedExpr.create(`config.${mcpGalleryServiceUrlConfig}`)), ( ProductQualityContext.notEqualsTo("stable")), ( ContextKeyDefinedExpr.create(`config.${mcpGalleryServiceEnablementConfig}`))))))
|
|
537
555
|
}, {
|
|
538
556
|
id: "workbench.views.mcp.default.welcomeView",
|
|
539
|
-
name: ( localize2(
|
|
557
|
+
name: ( localize2(10181, "MCP Servers")),
|
|
540
558
|
ctorDescriptor: ( new SyncDescriptor(DefaultBrowseMcpServersView, [{
|
|
541
559
|
showWelcome: true
|
|
542
560
|
}])),
|
|
@@ -546,7 +564,7 @@ class McpServersViewsContribution extends Disposable {
|
|
|
546
564
|
canToggleVisibility: true
|
|
547
565
|
}, {
|
|
548
566
|
id: "workbench.views.mcp.welcomeView",
|
|
549
|
-
name: ( localize2(
|
|
567
|
+
name: ( localize2(10181, "MCP Servers")),
|
|
550
568
|
ctorDescriptor: ( new SyncDescriptor(McpServersListView, [{
|
|
551
569
|
showWelcome: true
|
|
552
570
|
}])),
|
|
@@ -23,7 +23,7 @@ import { IWorkspaceContextService } from "@codingame/monaco-vscode-api/vscode/vs
|
|
|
23
23
|
import { IWorkbenchContribution } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions";
|
|
24
24
|
import { IEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service";
|
|
25
25
|
import { IWorkbenchEnvironmentService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/environment/common/environmentService.service";
|
|
26
|
-
import { IWorkbenchLocalMcpServer, IWorkbencMcpServerInstallOptions } from "
|
|
26
|
+
import { IWorkbenchLocalMcpServer, IWorkbencMcpServerInstallOptions } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/mcp/common/mcpWorkbenchManagementService";
|
|
27
27
|
import { IWorkbenchMcpManagementService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/mcp/common/mcpWorkbenchManagementService.service";
|
|
28
28
|
import { IRemoteAgentService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/remote/common/remoteAgentService.service";
|
|
29
29
|
import { IMcpConfigPath, IWorkbenchMcpServer, McpServerInstallState, McpServerEnablementStatus } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpTypes";
|
|
@@ -25,16 +25,16 @@ import { IURLService } from '@codingame/monaco-vscode-api/vscode/vs/platform/url
|
|
|
25
25
|
import { IUserDataProfilesService } from '@codingame/monaco-vscode-api/vscode/vs/platform/userDataProfile/common/userDataProfile.service';
|
|
26
26
|
import { IWorkspaceContextService } from '@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service';
|
|
27
27
|
import { WORKSPACE_STANDALONE_CONFIGURATIONS, MCP_CONFIGURATION_KEY } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/configuration/common/configuration';
|
|
28
|
-
import { ACTIVE_GROUP } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService';
|
|
28
|
+
import { MODAL_GROUP, ACTIVE_GROUP } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService';
|
|
29
29
|
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
30
30
|
import { IWorkbenchEnvironmentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/environment/common/environmentService.service';
|
|
31
|
-
import { LocalMcpServerScope, USER_CONFIG_ID, REMOTE_USER_CONFIG_ID, WORKSPACE_CONFIG_ID, WORKSPACE_FOLDER_CONFIG_ID_PREFIX } from '
|
|
31
|
+
import { LocalMcpServerScope, USER_CONFIG_ID, REMOTE_USER_CONFIG_ID, WORKSPACE_CONFIG_ID, WORKSPACE_FOLDER_CONFIG_ID_PREFIX } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/mcp/common/mcpWorkbenchManagementService';
|
|
32
32
|
import { IWorkbenchMcpManagementService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/mcp/common/mcpWorkbenchManagementService.service';
|
|
33
33
|
import { IRemoteAgentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/remote/common/remoteAgentService.service';
|
|
34
34
|
import { mcpConfigurationSection } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpConfiguration';
|
|
35
35
|
import { McpServerEnablementState, McpCollectionSortOrder, McpServerInstallState, McpServersGalleryStatusContext, HasInstalledMcpServersContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpTypes';
|
|
36
36
|
import { IMcpService, IMcpWorkbenchService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpTypes.service';
|
|
37
|
-
import { McpServerEditorInput } from '
|
|
37
|
+
import { McpServerEditorInput } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/browser/mcpServerEditorInput';
|
|
38
38
|
import { IMcpGalleryManifestService } from '@codingame/monaco-vscode-api/vscode/vs/platform/mcp/common/mcpGalleryManifest.service';
|
|
39
39
|
import { IExtensionsWorkbenchService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/extensions/common/extensions.service';
|
|
40
40
|
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
@@ -442,7 +442,7 @@ let McpWorkbenchService = class McpWorkbenchService extends Disposable {
|
|
|
442
442
|
const existing = result.get(server.name);
|
|
443
443
|
if (existing) {
|
|
444
444
|
this.logService.warn(( localize(
|
|
445
|
-
|
|
445
|
+
10182,
|
|
446
446
|
"Overwriting mcp server '{0}' from {1} with {2}.",
|
|
447
447
|
server.name,
|
|
448
448
|
server.mcpResource.path,
|
|
@@ -455,7 +455,7 @@ let McpWorkbenchService = class McpWorkbenchService extends Disposable {
|
|
|
455
455
|
const existing = result.get(server.name);
|
|
456
456
|
if (existing) {
|
|
457
457
|
this.logService.warn(( localize(
|
|
458
|
-
|
|
458
|
+
10182,
|
|
459
459
|
"Overwriting mcp server '{0}' from {1} with {2}.",
|
|
460
460
|
server.name,
|
|
461
461
|
server.mcpResource.path,
|
|
@@ -468,7 +468,7 @@ let McpWorkbenchService = class McpWorkbenchService extends Disposable {
|
|
|
468
468
|
}
|
|
469
469
|
canInstall(mcpServer) {
|
|
470
470
|
if (!(mcpServer instanceof McpWorkbenchServer)) {
|
|
471
|
-
return ( new MarkdownString()).appendText(( localize(
|
|
471
|
+
return ( new MarkdownString()).appendText(( localize(10183, "The provided object is not an mcp server.")));
|
|
472
472
|
}
|
|
473
473
|
if (mcpServer.gallery) {
|
|
474
474
|
const result = this.mcpManagementService.canInstall(mcpServer.gallery);
|
|
@@ -485,7 +485,7 @@ let McpWorkbenchService = class McpWorkbenchService extends Disposable {
|
|
|
485
485
|
return result;
|
|
486
486
|
}
|
|
487
487
|
return ( new MarkdownString()).appendText(( localize(
|
|
488
|
-
|
|
488
|
+
10184,
|
|
489
489
|
"Cannot install the '{0}' MCP Server because it is not available in this setup.",
|
|
490
490
|
mcpServer.label
|
|
491
491
|
)));
|
|
@@ -592,7 +592,7 @@ let McpWorkbenchService = class McpWorkbenchService extends Disposable {
|
|
|
592
592
|
id: USER_CONFIG_ID,
|
|
593
593
|
key: "userLocalValue",
|
|
594
594
|
target: ConfigurationTarget.USER_LOCAL,
|
|
595
|
-
label: ( localize(
|
|
595
|
+
label: ( localize(10185, "Global in {0}", this.productService.nameShort)),
|
|
596
596
|
scope: StorageScope.PROFILE,
|
|
597
597
|
order: McpCollectionSortOrder.User,
|
|
598
598
|
uri: mcpResource,
|
|
@@ -747,10 +747,11 @@ let McpWorkbenchService = class McpWorkbenchService extends Disposable {
|
|
|
747
747
|
await this.extensionsWorkbenchService.openSearch(`@mcp ${searchValue}`, preserveFoucs);
|
|
748
748
|
}
|
|
749
749
|
async open(extension, options) {
|
|
750
|
+
const useModal = this.configurationService.getValue("extensions.allowOpenInModalEditor");
|
|
750
751
|
await this.editorService.openEditor(
|
|
751
752
|
this.instantiationService.createInstance(McpServerEditorInput, extension),
|
|
752
753
|
options,
|
|
753
|
-
ACTIVE_GROUP
|
|
754
|
+
useModal ? MODAL_GROUP : ACTIVE_GROUP
|
|
754
755
|
);
|
|
755
756
|
}
|
|
756
757
|
getInstallState(extension) {
|
|
@@ -789,7 +790,7 @@ let McpWorkbenchService = class McpWorkbenchService extends Disposable {
|
|
|
789
790
|
message: {
|
|
790
791
|
severity: Severity.Warning,
|
|
791
792
|
text: ( new MarkdownString(( localize(
|
|
792
|
-
|
|
793
|
+
10186,
|
|
793
794
|
"This MCP Server is disabled because MCP servers are configured to be disabled in the Editor. Please check your [settings]({0}).",
|
|
794
795
|
settingsCommandLink
|
|
795
796
|
))))
|
|
@@ -803,7 +804,7 @@ let McpWorkbenchService = class McpWorkbenchService extends Disposable {
|
|
|
803
804
|
message: {
|
|
804
805
|
severity: Severity.Warning,
|
|
805
806
|
text: ( new MarkdownString(( localize(
|
|
806
|
-
|
|
807
|
+
10187,
|
|
807
808
|
"This MCP Server is disabled because it is configured to be disabled in the Editor. Please check your [settings]({0}).",
|
|
808
809
|
settingsCommandLink
|
|
809
810
|
))))
|
|
@@ -817,7 +818,7 @@ let McpWorkbenchService = class McpWorkbenchService extends Disposable {
|
|
|
817
818
|
message: {
|
|
818
819
|
severity: Severity.Warning,
|
|
819
820
|
text: ( new MarkdownString(( localize(
|
|
820
|
-
|
|
821
|
+
10187,
|
|
821
822
|
"This MCP Server is disabled because it is configured to be disabled in the Editor. Please check your [settings]({0}).",
|
|
822
823
|
settingsCommandLink
|
|
823
824
|
))))
|