@codingame/monaco-vscode-mcp-service-override 26.2.2 → 28.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.
Files changed (66) hide show
  1. package/index.js +8 -2
  2. package/package.json +2 -2
  3. package/vscode/src/vs/base/common/jsonRpcProtocol.d.ts +66 -0
  4. package/vscode/src/vs/base/common/jsonRpcProtocol.js +216 -0
  5. package/vscode/src/vs/platform/mcp/common/allowedMcpServersService.js +1 -1
  6. package/vscode/src/vs/platform/mcp/common/mcpGalleryService.js +2 -2
  7. package/vscode/src/vs/platform/mcp/common/mcpGateway.d.ts +39 -0
  8. package/vscode/src/vs/platform/mcp/common/mcpGateway.js +6 -0
  9. package/vscode/src/vs/platform/mcp/common/mcpResourceScannerService.d.ts +3 -1
  10. package/vscode/src/vs/platform/mcp/common/mcpResourceScannerService.js +12 -5
  11. package/vscode/src/vs/workbench/contrib/mcp/browser/mcp.contribution.js +15 -5
  12. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpAddContextContribution.js +2 -2
  13. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpCommands.js +58 -58
  14. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpElicitationService.js +27 -28
  15. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpGatewayService.d.ts +20 -0
  16. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpGatewayService.js +51 -0
  17. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpGatewayToolBrokerContribution.d.ts +7 -0
  18. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpGatewayToolBrokerContribution.js +16 -0
  19. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpLanguageFeatures.js +18 -18
  20. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpMigration.js +4 -4
  21. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpResourceQuickAccess.js +8 -8
  22. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServersView.d.ts +4 -1
  23. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServersView.js +42 -24
  24. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpWorkbenchService.d.ts +1 -1
  25. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpWorkbenchService.js +13 -12
  26. package/vscode/src/vs/workbench/contrib/mcp/common/discovery/extensionMcpDiscovery.js +4 -4
  27. package/vscode/src/vs/workbench/contrib/mcp/common/discovery/installedMcpServersDiscovery.js +3 -1
  28. package/vscode/src/vs/workbench/contrib/mcp/common/discovery/nativeMcpDiscoveryAbstract.js +1 -1
  29. package/vscode/src/vs/workbench/contrib/mcp/common/discovery/nativeMcpDiscoveryAdapters.js +2 -1
  30. package/vscode/src/vs/workbench/contrib/mcp/common/discovery/pluginMcpDiscovery.d.ts +15 -0
  31. package/vscode/src/vs/workbench/contrib/mcp/common/discovery/pluginMcpDiscovery.js +106 -0
  32. package/vscode/src/vs/workbench/contrib/mcp/common/mcpContextKeys.js +4 -4
  33. package/vscode/src/vs/workbench/contrib/mcp/common/mcpGatewayToolBrokerChannel.d.ts +39 -0
  34. package/vscode/src/vs/workbench/contrib/mcp/common/mcpGatewayToolBrokerChannel.js +302 -0
  35. package/vscode/src/vs/workbench/contrib/mcp/common/mcpLanguageModelToolContribution.js +25 -17
  36. package/vscode/src/vs/workbench/contrib/mcp/common/mcpRegistry.d.ts +3 -1
  37. package/vscode/src/vs/workbench/contrib/mcp/common/mcpRegistry.js +27 -18
  38. package/vscode/src/vs/workbench/contrib/mcp/common/mcpSamplingLog.js +1 -1
  39. package/vscode/src/vs/workbench/contrib/mcp/common/mcpSamplingService.d.ts +1 -0
  40. package/vscode/src/vs/workbench/contrib/mcp/common/mcpSamplingService.js +28 -18
  41. package/vscode/src/vs/workbench/contrib/mcp/common/mcpSandboxService.d.ts +47 -0
  42. package/vscode/src/vs/workbench/contrib/mcp/common/mcpSandboxService.js +385 -0
  43. package/vscode/src/vs/workbench/contrib/mcp/common/mcpServerConnection.d.ts +6 -1
  44. package/vscode/src/vs/workbench/contrib/mcp/common/mcpServerConnection.js +61 -3
  45. package/vscode/src/vs/workbench/contrib/mcp/common/mcpServerRequestHandler.d.ts +4 -20
  46. package/vscode/src/vs/workbench/contrib/mcp/common/mcpServerRequestHandler.js +95 -145
  47. package/vscode/src/vs/workbench/services/authentication/browser/authenticationMcpService.js +9 -9
  48. package/vscode/src/vs/workbench/services/mcp/browser/mcpWorkbenchManagementService.d.ts +1 -1
  49. package/vscode/src/vs/workbench/services/mcp/browser/mcpWorkbenchManagementService.js +2 -2
  50. package/vscode/src/vs/platform/mcp/common/mcpManagementIpc.d.ts +0 -42
  51. package/vscode/src/vs/platform/mcp/common/mcpManagementIpc.js +0 -105
  52. package/vscode/src/vs/platform/mcp/common/mcpManagementService.d.ts +0 -130
  53. package/vscode/src/vs/platform/mcp/common/mcpManagementService.js +0 -665
  54. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerActions.d.ts +0 -259
  55. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerActions.js +0 -1225
  56. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerEditor.d.ts +0 -72
  57. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerEditor.js +0 -996
  58. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerEditorInput.d.ts +0 -17
  59. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerEditorInput.js +0 -49
  60. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerIcons.d.ts +0 -5
  61. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerIcons.js +0 -12
  62. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerWidgets.d.ts +0 -88
  63. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerWidgets.js +0 -464
  64. package/vscode/src/vs/workbench/contrib/mcp/browser/media/mcpServerEditor.css +0 -94
  65. package/vscode/src/vs/workbench/services/mcp/common/mcpWorkbenchManagementService.d.ts +0 -87
  66. package/vscode/src/vs/workbench/services/mcp/common/mcpWorkbenchManagementService.js +0 -702
@@ -0,0 +1,51 @@
1
+
2
+ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
+ import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
4
+ import { ProxyChannel } from '@codingame/monaco-vscode-api/vscode/vs/base/parts/ipc/common/ipc';
5
+ import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
6
+ import { McpGatewayChannelName } from '../../../../platform/mcp/common/mcpGateway.js';
7
+ import { IRemoteAgentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/remote/common/remoteAgentService.service';
8
+
9
+ let BrowserMcpGatewayService = class BrowserMcpGatewayService {
10
+ constructor(_remoteAgentService, _logService) {
11
+ this._remoteAgentService = _remoteAgentService;
12
+ this._logService = _logService;
13
+ }
14
+ async createGateway(inRemote) {
15
+ this._logService.debug(
16
+ `[McpGateway][BrowserWorkbench] createGateway requested (inRemote=${inRemote})`
17
+ );
18
+ if (!inRemote) {
19
+ this._logService.info(
20
+ "[McpGateway][BrowserWorkbench] Cannot create local gateway in browser environment"
21
+ );
22
+ return undefined;
23
+ }
24
+ const connection = this._remoteAgentService.getConnection();
25
+ if (!connection) {
26
+ this._logService.info(
27
+ "[McpGateway][BrowserWorkbench] No remote connection available (serverless web)"
28
+ );
29
+ return undefined;
30
+ }
31
+ this._logService.info("[McpGateway][BrowserWorkbench] Creating remote gateway via remote server");
32
+ return connection.withChannel(McpGatewayChannelName, async channel => {
33
+ const service = ProxyChannel.toService(channel);
34
+ const info = await service.createGateway(undefined);
35
+ const address = URI.revive(info.address);
36
+ this._logService.info(`[McpGateway][BrowserWorkbench] Remote gateway created: ${address}`);
37
+ return {
38
+ address,
39
+ dispose: () => {
40
+ this._logService.info(
41
+ `[McpGateway][BrowserWorkbench] Disposing remote gateway: ${info.gatewayId}`
42
+ );
43
+ service.disposeGateway(info.gatewayId);
44
+ }
45
+ };
46
+ });
47
+ }
48
+ };
49
+ BrowserMcpGatewayService = ( __decorate([( __param(0, IRemoteAgentService)), ( __param(1, ILogService))], BrowserMcpGatewayService));
50
+
51
+ export { BrowserMcpGatewayService };
@@ -0,0 +1,7 @@
1
+ import { IWorkbenchContribution } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions";
2
+ import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
3
+ import { IRemoteAgentService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/remote/common/remoteAgentService.service";
4
+ import { IMcpService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpTypes.service";
5
+ export declare class McpGatewayToolBrokerContribution implements IWorkbenchContribution {
6
+ constructor(remoteAgentService: IRemoteAgentService, mcpService: IMcpService, logService: ILogService);
7
+ }
@@ -0,0 +1,16 @@
1
+
2
+ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
+ import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
4
+ import { McpGatewayToolBrokerChannelName } from '../../../../platform/mcp/common/mcpGateway.js';
5
+ import { IRemoteAgentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/remote/common/remoteAgentService.service';
6
+ import { IMcpService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpTypes.service';
7
+ import { McpGatewayToolBrokerChannel } from '../common/mcpGatewayToolBrokerChannel.js';
8
+
9
+ let McpGatewayToolBrokerContribution = class McpGatewayToolBrokerContribution {
10
+ constructor(remoteAgentService, mcpService, logService) {
11
+ remoteAgentService.getConnection()?.registerChannel(McpGatewayToolBrokerChannelName, ( new McpGatewayToolBrokerChannel(mcpService, logService)));
12
+ }
13
+ };
14
+ McpGatewayToolBrokerContribution = ( __decorate([( __param(0, IRemoteAgentService)), ( __param(1, IMcpService)), ( __param(2, ILogService))], McpGatewayToolBrokerContribution));
15
+
16
+ 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
- 9363,
118
+ 10244,
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(9364, "Error")),
184
+ title: "$(error) " + ( localize(10245, "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(9365, "Restart")),
191
+ title: ( localize(10246, "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(9366, "Debug")),
202
+ title: ( localize(10247, "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(9367, "Starting")),
216
+ title: "$(loading~spin) " + ( localize(10248, "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(9368, "Cancel")),
223
+ title: ( localize(10249, "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(9369, "Running")),
233
+ title: "$(check) " + ( localize(10250, "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(9370, "Stop")),
240
+ title: ( localize(10251, "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(9365, "Restart")),
247
+ title: ( localize(10246, "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(9366, "Debug")),
258
+ title: ( localize(10247, "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(9371, "Start")),
272
+ title: "$(debug-start) " + ( localize(10252, "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(9366, "Debug")),
283
+ title: ( localize(10247, "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(9372, "{0} tools", toolCount))
299
+ title: ( localize(10253, "{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(9373, "{0} prompts", promptCount)),
309
+ title: ( localize(10254, "{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(9374, "More...")),
318
+ title: ( localize(10255, "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(9375, "Edit")),
393
+ title: ( localize(10256, "Edit")),
394
394
  arguments: [savedId, model.uri, mcpConfigurationSection, inConfig.target]
395
395
  }), createMarkdownCommandLink({
396
396
  id: McpCommandIds.RemoveStoredInput,
397
- title: ( localize(9376, "Clear")),
397
+ title: ( localize(10257, "Clear")),
398
398
  arguments: [inConfig.scope, savedId]
399
399
  }), createMarkdownCommandLink({
400
400
  id: McpCommandIds.RemoveStoredInput,
401
- title: ( localize(9377, "Clear All")),
401
+ title: ( localize(10258, "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
- 9378,
101
+ 10259,
102
102
  "MCP servers should no longer be configured in remote user settings. Use the dedicated MCP configuration instead."
103
103
  )) : ( localize(
104
- 9379,
104
+ 10260,
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(9380, "Open Remote User MCP Configuration")) : ( localize(9381, "Open User MCP Configuration"));
107
+ const openConfigLabel = isRemote ? ( localize(10261, "Open Remote User MCP Configuration")) : ( localize(10262, "Open User MCP Configuration"));
108
108
  const commandId = isRemote ? McpCommandIds.OpenRemoteUserMcp : McpCommandIds.OpenUserMcp;
109
109
  this.notificationService.prompt(Severity.Error, message, [{
110
- label: ( localize(9382, "Update Now")),
110
+ label: ( localize(10263, "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(9398, "Resource template: {0}", resource.template.template)),
77
+ detail: ( localize(10279, "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
- 9399,
224
+ 10280,
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
- 9400,
269
+ 10281,
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(9401, "Optional")) + ")";
275
+ placeholder += " (" + ( localize(10282, "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(9402, "<Empty>"))
295
+ label: ( localize(10283, "<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(9403, "Attach to chat"));
466
+ const attachButton = ( localize(10284, "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(9404, "Go back ↩")),
494
+ label: ( localize(10285, "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(9405, "Search for resources"));
576
+ qp.placeholder = ( localize(10286, "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 './mcpServerActions.js';
30
- import { McpServerIconWidget, PublisherWidget, StarredWidget, McpServerScopeBadgeWidget, McpServerHoverWidget } from './mcpServerWidgets.js';
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 './mcpServerIcons.js';
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(9475, "MCP Servers");
145
+ return localize(10356, "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, options.editorOptions);
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(9476, "MCP Servers"));
254
+ title.textContent = ( localize(10357, "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(9477, "Open Settings"))
259
+ tooltip: ( localize(10358, "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
- 9478,
263
+ 10359,
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
- 9479,
270
+ 10360,
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(9480, "Enable MCP Servers Marketplace")),
277
+ title: ( localize(10361, "Enable MCP Servers Marketplace")),
260
278
  ...defaultButtonStyles
261
279
  })));
262
- button.label = ( localize(9480, "Enable MCP Servers Marketplace"));
280
+ button.label = ( localize(10361, "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(9481, "Enable MCP Servers Marketplace?")),
286
+ message: ( localize(10362, "Enable MCP Servers Marketplace?")),
269
287
  custom: {
270
288
  markdownDetails: [{
271
289
  markdown: ( new MarkdownString(( localize(
272
- 9479,
290
+ 10360,
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(9482, "Enable")),
299
+ label: ( localize(10363, "Enable")),
282
300
  run: () => true
283
301
  }, {
284
- label: ( localize(9483, "Cancel")),
302
+ label: ( localize(10364, "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(9484, "No MCP Servers found."));
322
+ this.bodyTemplate.messageBox.textContent = ( localize(10365, "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(9485, "MCP Servers - Installed")),
536
+ name: ( localize2(10366, "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(9486, "MCP Servers")),
544
+ name: ( localize2(10367, "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(9486, "MCP Servers")),
552
+ name: ( localize2(10367, "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(9486, "MCP Servers")),
557
+ name: ( localize2(10367, "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(9486, "MCP Servers")),
567
+ name: ( localize2(10367, "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 "../../../services/mcp/common/mcpWorkbenchManagementService.js";
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";