@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.
Files changed (29) hide show
  1. package/index.js +1 -0
  2. package/package.json +2 -2
  3. package/vscode/src/vs/platform/mcp/common/allowedMcpServersService.js +3 -3
  4. package/vscode/src/vs/platform/mcp/common/mcpGalleryService.js +2 -2
  5. package/vscode/src/vs/workbench/api/browser/mainThreadMcp.d.ts +108 -0
  6. package/vscode/src/vs/workbench/api/browser/mainThreadMcp.js +698 -0
  7. package/vscode/src/vs/workbench/contrib/mcp/browser/mcp.contribution.js +3 -3
  8. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpAddContextContribution.js +2 -2
  9. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpCommands.js +96 -96
  10. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpElicitationService.js +25 -25
  11. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpLanguageFeatures.js +35 -35
  12. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpMigration.js +4 -4
  13. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpResourceQuickAccess.js +8 -8
  14. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerEditor.js +37 -37
  15. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerEditorInput.js +2 -2
  16. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerIcons.js +5 -5
  17. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerWidgets.js +5 -5
  18. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServersView.js +17 -17
  19. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpWorkbenchService.js +10 -10
  20. package/vscode/src/vs/workbench/contrib/mcp/common/discovery/extensionMcpDiscovery.js +4 -4
  21. package/vscode/src/vs/workbench/contrib/mcp/common/discovery/nativeMcpDiscoveryAbstract.js +1 -1
  22. package/vscode/src/vs/workbench/contrib/mcp/common/mcpContextKeys.js +4 -4
  23. package/vscode/src/vs/workbench/contrib/mcp/common/mcpLanguageModelToolContribution.js +6 -6
  24. package/vscode/src/vs/workbench/contrib/mcp/common/mcpRegistry.js +13 -13
  25. package/vscode/src/vs/workbench/contrib/mcp/common/mcpSamplingLog.js +1 -1
  26. package/vscode/src/vs/workbench/contrib/mcp/common/mcpSamplingService.js +11 -11
  27. package/vscode/src/vs/workbench/contrib/mcp/common/mcpSandboxService.js +3 -3
  28. package/vscode/src/vs/workbench/contrib/mcp/common/mcpServerConnection.js +3 -3
  29. package/vscode/src/vs/workbench/services/authentication/browser/authenticationMcpService.js +9 -9
@@ -14,19 +14,19 @@ var McpContextKeys;
14
14
  (function(McpContextKeys) {
15
15
  McpContextKeys.serverCount = ( new RawContextKey("mcp.serverCount", undefined, {
16
16
  type: "number",
17
- description: ( localize(13893, "Context key that has the number of registered MCP servers"))
17
+ description: ( localize(14110, "Context key that has the number of registered MCP servers"))
18
18
  }));
19
19
  McpContextKeys.hasUnknownTools = ( new RawContextKey("mcp.hasUnknownTools", undefined, {
20
20
  type: "boolean",
21
- description: ( localize(13894, "Indicates whether there are MCP servers with unknown tools."))
21
+ description: ( localize(14111, "Indicates whether there are MCP servers with unknown tools."))
22
22
  }));
23
23
  McpContextKeys.hasServersWithErrors = ( new RawContextKey("mcp.hasServersWithErrors", undefined, {
24
24
  type: "boolean",
25
- description: ( localize(13895, "Indicates whether there are any MCP servers with errors."))
25
+ description: ( localize(14112, "Indicates whether there are any MCP servers with errors."))
26
26
  }));
27
27
  McpContextKeys.toolsCount = ( new RawContextKey("mcp.toolsCount", undefined, {
28
28
  type: "number",
29
- description: ( localize(13896, "Context key that has the number of registered MCP tools"))
29
+ description: ( localize(14113, "Context key that has the number of registered MCP tools"))
30
30
  }));
31
31
  })(McpContextKeys || (McpContextKeys = {}));
32
32
  let McpContextKeysController = class McpContextKeysController extends Disposable {
@@ -71,7 +71,7 @@ let McpLanguageModelToolContribution = class McpLanguageModelToolContribution ex
71
71
  const toolSet = store.add(
72
72
  this._toolsService.createToolSet(source, server.definition.id, referenceName, {
73
73
  icon: Codicon.mcp,
74
- description: ( localize(13897, "{0}: All Tools", server.definition.label)),
74
+ description: ( localize(14114, "{0}: All Tools", server.definition.label)),
75
75
  deprecated: true
76
76
  })
77
77
  );
@@ -192,7 +192,7 @@ let McpToolImplementation = class McpToolImplementation {
192
192
  });
193
193
  const isSandboxedServer = sandboxEnabled === true;
194
194
  const mcpToolWarning = ( localize(
195
- 13898,
195
+ 14115,
196
196
  "Note that MCP servers or malicious conversation content may attempt to misuse '{0}' through tools.",
197
197
  this._productService.nameShort
198
198
  ));
@@ -201,7 +201,7 @@ let McpToolImplementation = class McpToolImplementation {
201
201
  if (!isSandboxedServer) {
202
202
  confirm = {};
203
203
  if (!tool.definition.annotations?.readOnlyHint) {
204
- confirm.title = ( new MarkdownString(( localize(13899, "Run {0}", title))));
204
+ confirm.title = ( new MarkdownString(( localize(14116, "Run {0}", title))));
205
205
  confirm.message = ( new MarkdownString(tool.definition.description, {
206
206
  supportThemeIcons: true
207
207
  }));
@@ -215,9 +215,9 @@ let McpToolImplementation = class McpToolImplementation {
215
215
  const mcpUiEnabled = this._configurationService.getValue(mcpAppsEnabledConfig);
216
216
  return {
217
217
  confirmationMessages: confirm,
218
- invocationMessage: ( new MarkdownString(( localize(13900, "Running {0}", title)))),
219
- pastTenseMessage: ( new MarkdownString(( localize(13901, "Ran {0} ", title)))),
220
- originMessage: ( localize(13902, "{0} (MCP Server)", server.definition.label)),
218
+ invocationMessage: ( new MarkdownString(( localize(14117, "Running {0}", title)))),
219
+ pastTenseMessage: ( new MarkdownString(( localize(14118, "Ran {0} ", title)))),
220
+ originMessage: ( localize(14119, "{0} (MCP Server)", server.definition.label)),
221
221
  toolSpecificData: {
222
222
  kind: "input",
223
223
  rawInput: context.parameters,
@@ -245,7 +245,7 @@ let McpRegistry = class McpRegistry extends Disposable {
245
245
  if (errorOnUserInteraction) {
246
246
  throw ( new UserInteractionRequiredError("workspaceTrust"));
247
247
  } else if (!(await this._workspaceTrustRequestService.requestWorkspaceTrust({
248
- message: ( localize(13903, "This MCP server definition is defined in your workspace files."))
248
+ message: ( localize(14120, "This MCP server definition is defined in your workspace files."))
249
249
  }))) {
250
250
  return false;
251
251
  }
@@ -323,7 +323,7 @@ let McpRegistry = class McpRegistry extends Disposable {
323
323
  const originURI = r.definition.presentation?.origin?.uri || r.collection.presentation?.origin;
324
324
  let labelWithOrigin = originURI ? `[\`${r.definition.label}\`](${originURI})` : "`" + r.definition.label + "`";
325
325
  if (r.collection.source instanceof ExtensionIdentifier) {
326
- labelWithOrigin += ` (${( localize(13904, "from {0}", r.collection.source.value))})`;
326
+ labelWithOrigin += ` (${( localize(14121, "from {0}", r.collection.source.value))})`;
327
327
  }
328
328
  return labelWithOrigin;
329
329
  }
@@ -333,12 +333,12 @@ let McpRegistry = class McpRegistry extends Disposable {
333
333
  const {
334
334
  result
335
335
  } = await this._dialogService.prompt({
336
- message: ( localize(13905, "Trust and run MCP server {0}?", def.definition.label)),
336
+ message: ( localize(14122, "Trust and run MCP server {0}?", def.definition.label)),
337
337
  custom: {
338
338
  icon: Codicon.shield,
339
339
  markdownDetails: [{
340
340
  markdown: ( new MarkdownString(( localize(
341
- 13906,
341
+ 14123,
342
342
  "The MCP server {0} was updated. MCP servers may add context to your chat session and lead to unexpected behavior. Do you want to trust and run this server?",
343
343
  labelFor(def)
344
344
  )))),
@@ -351,10 +351,10 @@ let McpRegistry = class McpRegistry extends Disposable {
351
351
  }]
352
352
  },
353
353
  buttons: [{
354
- label: ( localize(13907, "Trust")),
354
+ label: ( localize(14124, "Trust")),
355
355
  run: () => true
356
356
  }, {
357
- label: ( localize(13908, "Do not trust")),
357
+ label: ( localize(14125, "Do not trust")),
358
358
  run: () => false
359
359
  }]
360
360
  });
@@ -364,12 +364,12 @@ let McpRegistry = class McpRegistry extends Disposable {
364
364
  const {
365
365
  result
366
366
  } = await this._dialogService.prompt({
367
- message: ( localize(13909, "Trust and run {0} MCP servers?", definitions.length)),
367
+ message: ( localize(14126, "Trust and run {0} MCP servers?", definitions.length)),
368
368
  custom: {
369
369
  icon: Codicon.shield,
370
370
  markdownDetails: [{
371
371
  markdown: ( new MarkdownString(( localize(
372
- 13910,
372
+ 14127,
373
373
  "Several updated MCP servers were discovered:\n\n{0}\n\n MCP servers may add context to your chat session and lead to unexpected behavior. Do you want to trust and run these server?",
374
374
  list
375
375
  )))),
@@ -382,13 +382,13 @@ let McpRegistry = class McpRegistry extends Disposable {
382
382
  }]
383
383
  },
384
384
  buttons: [{
385
- label: ( localize(13907, "Trust")),
385
+ label: ( localize(14124, "Trust")),
386
386
  run: () => "all"
387
387
  }, {
388
- label: ( localize(13911, "Pick Trusted")),
388
+ label: ( localize(14128, "Pick Trusted")),
389
389
  run: () => "pick"
390
390
  }, {
391
- label: ( localize(13908, "Do not trust")),
391
+ label: ( localize(14125, "Do not trust")),
392
392
  run: () => "none"
393
393
  }]
394
394
  });
@@ -565,14 +565,14 @@ let McpRegistry = class McpRegistry extends Disposable {
565
565
  }
566
566
  this._notificationService.notify({
567
567
  severity: Severity.Error,
568
- message: ( localize(13912, "Error starting {0}: {1}", definition.label, String(e))),
568
+ message: ( localize(14129, "Error starting {0}: {1}", definition.label, String(e))),
569
569
  actions: {
570
570
  primary: collection.presentation?.origin && [{
571
571
  id: "mcp.launchError.openConfig",
572
572
  class: undefined,
573
573
  enabled: true,
574
574
  tooltip: "",
575
- label: ( localize(13913, "Open Configuration")),
575
+ label: ( localize(14130, "Open Configuration")),
576
576
  run: () => this._editorService.openEditor({
577
577
  resource: collection.presentation.origin,
578
578
  options: {
@@ -41,7 +41,7 @@ let McpSamplingLog = class McpSamplingLog extends Disposable {
41
41
  }
42
42
  const parts = [];
43
43
  const total = record.bins.reduce((sum, value) => sum + value, 0);
44
- parts.push(( localize(13914, "{0} total requests in the last 7 days.", total)));
44
+ parts.push(( localize(14131, "{0} total requests in the last 7 days.", total)));
45
45
  parts.push(this._formatRecentRequests(record));
46
46
  return parts.join("\n");
47
47
  }
@@ -131,11 +131,11 @@ let McpSamplingService = class McpSamplingService extends Disposable {
131
131
  return this._getMatchingModel(opts);
132
132
  }
133
133
  const retry = await this._showContextual(opts.isDuringToolCall, ( localize(
134
- 13915,
134
+ 14132,
135
135
  "Allow MCP tools from \"{0}\" to make LLM requests?",
136
136
  opts.server.definition.label
137
137
  )), ( localize(
138
- 13916,
138
+ 14133,
139
139
  "The MCP server \"{0}\" has issued a request to make a language model call. Do you want to allow it to make requests during chat?",
140
140
  opts.server.definition.label
141
141
  )), this.allowButtons(opts.server, "allowedDuringChat"));
@@ -149,11 +149,11 @@ let McpSamplingService = class McpSamplingService extends Disposable {
149
149
  return this._getMatchingModel(opts);
150
150
  }
151
151
  const retry = await this._showContextual(opts.isDuringToolCall, ( localize(
152
- 13917,
152
+ 14134,
153
153
  "Allow MCP server \"{0}\" to make LLM requests?",
154
154
  opts.server.definition.label
155
155
  )), ( localize(
156
- 13918,
156
+ 14135,
157
157
  "The MCP server \"{0}\" has issued a request to make a language model call. Do you want to allow it to make requests, outside of tool calls during chat?",
158
158
  opts.server.definition.label
159
159
  )), this.allowButtons(opts.server, "allowedOutsideChat"));
@@ -165,12 +165,12 @@ let McpSamplingService = class McpSamplingService extends Disposable {
165
165
  throw McpError.notAllowed();
166
166
  } else if (model === ModelMatch.NoMatchingModel) {
167
167
  const newlyPickedModels = opts.isDuringToolCall ? await this._commandService.executeCommand(McpCommandIds.ConfigureSamplingModels, opts.server) : await this._notify(( localize(
168
- 13919,
168
+ 14136,
169
169
  "MCP server \"{0}\" triggered a language model request, but it has no allowlisted models.",
170
170
  opts.server.definition.label
171
171
  )), {
172
- [( localize(13920, "Configure"))]: () => this._commandService.executeCommand(McpCommandIds.ConfigureSamplingModels, opts.server),
173
- [( localize(13921, "Cancel"))]: () => Promise.resolve(undefined)
172
+ [( localize(14137, "Configure"))]: () => this._commandService.executeCommand(McpCommandIds.ConfigureSamplingModels, opts.server),
173
+ [( localize(14138, "Cancel"))]: () => Promise.resolve(undefined)
174
174
  });
175
175
  if (newlyPickedModels) {
176
176
  return this._getMatchingModel(opts);
@@ -181,19 +181,19 @@ let McpSamplingService = class McpSamplingService extends Disposable {
181
181
  }
182
182
  allowButtons(server, key) {
183
183
  return {
184
- [( localize(13922, "Allow in this Session"))]: async () => {
184
+ [( localize(14139, "Allow in this Session"))]: async () => {
185
185
  this._sessionSets[key].set(server.definition.id, true);
186
186
  return true;
187
187
  },
188
- [( localize(13923, "Always"))]: async () => {
188
+ [( localize(14140, "Always"))]: async () => {
189
189
  await this.updateConfig(server, c => c[key] = true);
190
190
  return true;
191
191
  },
192
- [( localize(13924, "Not Now"))]: async () => {
192
+ [( localize(14141, "Not Now"))]: async () => {
193
193
  this._sessionSets[key].set(server.definition.id, false);
194
194
  return false;
195
195
  },
196
- [( localize(13925, "Never"))]: async () => {
196
+ [( localize(14142, "Never"))]: async () => {
197
197
  await this.updateConfig(server, c => c[key] = false);
198
198
  return false;
199
199
  }
@@ -131,11 +131,11 @@ let McpSandboxService = class McpSandboxService extends Disposable {
131
131
  const suggestionLines = [];
132
132
  if (allowedDomainsList.length) {
133
133
  const shown = ( allowedDomainsList.map(domain => `"${domain}"`)).join(", ");
134
- suggestionLines.push(( localize(13926, "Add to `sandbox.network.allowedDomains`: {0}", shown)));
134
+ suggestionLines.push(( localize(14143, "Add to `sandbox.network.allowedDomains`: {0}", shown)));
135
135
  }
136
136
  if (allowWriteList.length) {
137
137
  const shown = ( allowWriteList.map(path => `"${path}"`)).join(", ");
138
- suggestionLines.push(( localize(13927, "Add to `sandbox.filesystem.allowWrite`: {0}", shown)));
138
+ suggestionLines.push(( localize(14144, "Add to `sandbox.filesystem.allowWrite`: {0}", shown)));
139
139
  }
140
140
  const sandboxConfig = {};
141
141
  if (allowedDomainsList.length) {
@@ -150,7 +150,7 @@ let McpSandboxService = class McpSandboxService extends Disposable {
150
150
  }
151
151
  return {
152
152
  message: ( localize(
153
- 13928,
153
+ 14145,
154
154
  "The MCP server {0} reported potential sandbox blocks. VS Code found possible sandbox configuration updates:\n{1}",
155
155
  serverLabel,
156
156
  suggestionLines.join("\n")
@@ -52,7 +52,7 @@ let McpServerConnection = class McpServerConnection extends Disposable {
52
52
  this._state.set({
53
53
  state: McpConnectionState.Kind.Starting
54
54
  }, undefined);
55
- this._logger.info(( localize(13944, "Starting server {0}", this.definition.label)));
55
+ this._logger.info(( localize(14161, "Starting server {0}", this.definition.label)));
56
56
  try {
57
57
  const launch = this._delegate.start(this._collection, this.definition, this.launchDefinition, {
58
58
  errorOnUserInteraction: this._errorOnUserInteraction
@@ -89,7 +89,7 @@ let McpServerConnection = class McpServerConnection extends Disposable {
89
89
  store.add(autorun(reader => {
90
90
  const state = launch.state.read(reader);
91
91
  this._state.set(state, undefined);
92
- this._logger.info(( localize(13945, "Connection state: {0}", (McpConnectionState.toString(state)))));
92
+ this._logger.info(( localize(14162, "Connection state: {0}", (McpConnectionState.toString(state)))));
93
93
  if (state.state === McpConnectionState.Kind.Running && !didStart) {
94
94
  didStart = true;
95
95
  McpServerRequestHandler.create(this._instantiationService, {
@@ -128,7 +128,7 @@ let McpServerConnection = class McpServerConnection extends Disposable {
128
128
  };
129
129
  }
130
130
  async stop() {
131
- this._logger.info(( localize(13946, "Stopping server {0}", this.definition.label)));
131
+ this._logger.info(( localize(14163, "Stopping server {0}", this.definition.label)));
132
132
  this._launch.value?.object.stop();
133
133
  await this._waitForState(McpConnectionState.Kind.Stopped, McpConnectionState.Kind.Error);
134
134
  }
@@ -120,7 +120,7 @@ let AuthenticationMcpService = class AuthenticationMcpService extends Disposable
120
120
  numberOfRequests += ( Object.keys(accessRequest)).length;
121
121
  });
122
122
  if (numberOfRequests > 0) {
123
- const badge = ( new NumberBadge(numberOfRequests, () => ( localize(19114, "Sign in requested"))));
123
+ const badge = ( new NumberBadge(numberOfRequests, () => ( localize(19422, "Sign in requested"))));
124
124
  this._accountBadgeDisposable.value = this.activityService.showAccountsActivity({
125
125
  badge
126
126
  });
@@ -194,17 +194,17 @@ let AuthenticationMcpService = class AuthenticationMcpService extends Disposable
194
194
  } = await this.dialogService.prompt({
195
195
  type: Severity.Info,
196
196
  message: ( localize(
197
- 19115,
197
+ 19423,
198
198
  "The MCP server '{0}' wants to access the {1} account '{2}'.",
199
199
  mcpServerName,
200
200
  provider.label,
201
201
  accountName
202
202
  )),
203
203
  buttons: [{
204
- label: ( localize(19116, "&&Allow")),
204
+ label: ( localize(19424, "&&Allow")),
205
205
  run: () => SessionPromptChoice.Allow
206
206
  }, {
207
- label: ( localize(19117, "&&Deny")),
207
+ label: ( localize(19425, "&&Deny")),
208
208
  run: () => SessionPromptChoice.Deny
209
209
  }],
210
210
  cancelButton: {
@@ -246,17 +246,17 @@ let AuthenticationMcpService = class AuthenticationMcpService extends Disposable
246
246
  }
247
247
  });
248
248
  items.push({
249
- label: ( localize(19118, "Sign in to another account"))
249
+ label: ( localize(19426, "Sign in to another account"))
250
250
  });
251
251
  quickPick.items = items;
252
252
  quickPick.title = ( localize(
253
- 19119,
253
+ 19427,
254
254
  "The MCP server '{0}' wants to access a {1} account",
255
255
  mcpServerName,
256
256
  this._authenticationService.getProvider(providerId).label
257
257
  ));
258
258
  quickPick.placeholder = ( localize(
259
- 19120,
259
+ 19428,
260
260
  "Select an account for '{0}' to use or Esc to cancel",
261
261
  mcpServerName
262
262
  ));
@@ -336,7 +336,7 @@ let AuthenticationMcpService = class AuthenticationMcpService extends Disposable
336
336
  group: "3_accessRequests",
337
337
  command: {
338
338
  id: `${providerId}${mcpServerId}Access`,
339
- title: ( localize(19121, "Grant access to {0} for {1}... (1)", provider.label, mcpServerName))
339
+ title: ( localize(19429, "Grant access to {0} for {1}... (1)", provider.label, mcpServerName))
340
340
  }
341
341
  }));
342
342
  const accessCommand = CommandsRegistry.registerCommand({
@@ -380,7 +380,7 @@ let AuthenticationMcpService = class AuthenticationMcpService extends Disposable
380
380
  group: "2_signInRequests",
381
381
  command: {
382
382
  id: commandId,
383
- title: ( localize(19122, "Sign in with {0} to use {1} (1)", provider.label, mcpServerName))
383
+ title: ( localize(19430, "Sign in with {0} to use {1} (1)", provider.label, mcpServerName))
384
384
  }
385
385
  }));
386
386
  const signInCommand = CommandsRegistry.registerCommand({