@codingame/monaco-vscode-mcp-service-override 23.0.2 → 23.0.4

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 (25) hide show
  1. package/package.json +15 -15
  2. package/vscode/src/vs/workbench/contrib/mcp/browser/mcp.contribution.js +3 -3
  3. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpAddContextContribution.js +2 -2
  4. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpCommands.js +55 -55
  5. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpElicitationService.js +18 -18
  6. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpLanguageFeatures.js +18 -18
  7. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpMigration.js +5 -5
  8. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpResourceQuickAccess.js +7 -7
  9. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerActions.js +32 -32
  10. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerEditor.js +34 -34
  11. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerEditorInput.js +2 -2
  12. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerIcons.js +5 -5
  13. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerWidgets.js +5 -5
  14. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServersView.js +17 -17
  15. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpWorkbenchService.js +8 -8
  16. package/vscode/src/vs/workbench/contrib/mcp/common/discovery/extensionMcpDiscovery.js +4 -4
  17. package/vscode/src/vs/workbench/contrib/mcp/common/discovery/nativeMcpDiscoveryAbstract.js +1 -1
  18. package/vscode/src/vs/workbench/contrib/mcp/common/mcpContextKeys.js +4 -4
  19. package/vscode/src/vs/workbench/contrib/mcp/common/mcpLanguageModelToolContribution.js +6 -6
  20. package/vscode/src/vs/workbench/contrib/mcp/common/mcpRegistry.js +12 -12
  21. package/vscode/src/vs/workbench/contrib/mcp/common/mcpSamplingLog.js +1 -1
  22. package/vscode/src/vs/workbench/contrib/mcp/common/mcpSamplingService.js +11 -11
  23. package/vscode/src/vs/workbench/contrib/mcp/common/mcpServer.js +9 -9
  24. package/vscode/src/vs/workbench/contrib/mcp/common/mcpServerConnection.js +3 -3
  25. package/vscode/src/vs/workbench/services/authentication/browser/authenticationMcpService.js +9 -9
@@ -251,7 +251,7 @@ let McpRegistry = class McpRegistry extends Disposable {
251
251
  const originURI = r.definition.presentation?.origin?.uri || r.collection.presentation?.origin;
252
252
  let labelWithOrigin = originURI ? `[\`${r.definition.label}\`](${originURI})` : '`' + r.definition.label + '`';
253
253
  if (r.collection.source instanceof ExtensionIdentifier) {
254
- labelWithOrigin += ` (${( localize(8850, 'from {0}', r.collection.source.value))})`;
254
+ labelWithOrigin += ` (${( localize(8854, 'from {0}', r.collection.source.value))})`;
255
255
  }
256
256
  return labelWithOrigin;
257
257
  }
@@ -259,12 +259,12 @@ let McpRegistry = class McpRegistry extends Disposable {
259
259
  const def = definitions[0];
260
260
  const originURI = def.definition.presentation?.origin?.uri;
261
261
  const { result } = await this._dialogService.prompt({
262
- message: ( localize(8851, 'Trust and run MCP server {0}?', def.definition.label)),
262
+ message: ( localize(8855, 'Trust and run MCP server {0}?', def.definition.label)),
263
263
  custom: {
264
264
  icon: Codicon.shield,
265
265
  markdownDetails: [{
266
266
  markdown: ( new MarkdownString(( localize(
267
- 8852,
267
+ 8856,
268
268
  '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?',
269
269
  labelFor(def)
270
270
  )))),
@@ -275,20 +275,20 @@ let McpRegistry = class McpRegistry extends Disposable {
275
275
  }]
276
276
  },
277
277
  buttons: [
278
- { label: ( localize(8853, 'Trust')), run: () => true },
279
- { label: ( localize(8854, 'Do not trust')), run: () => false }
278
+ { label: ( localize(8857, 'Trust')), run: () => true },
279
+ { label: ( localize(8858, 'Do not trust')), run: () => false }
280
280
  ],
281
281
  });
282
282
  return result === undefined ? undefined : (result ? [def.definition.id] : []);
283
283
  }
284
284
  const list = ( definitions.map(d => `- ${labelFor(d)}`)).join('\n');
285
285
  const { result } = await this._dialogService.prompt({
286
- message: ( localize(8855, 'Trust and run {0} MCP servers?', definitions.length)),
286
+ message: ( localize(8859, 'Trust and run {0} MCP servers?', definitions.length)),
287
287
  custom: {
288
288
  icon: Codicon.shield,
289
289
  markdownDetails: [{
290
290
  markdown: ( new MarkdownString(( localize(
291
- 8856,
291
+ 8860,
292
292
  '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?',
293
293
  list
294
294
  )))),
@@ -299,9 +299,9 @@ let McpRegistry = class McpRegistry extends Disposable {
299
299
  }]
300
300
  },
301
301
  buttons: [
302
- { label: ( localize(8853, 'Trust')), run: () => 'all' },
303
- { label: ( localize(8857, 'Pick Trusted')), run: () => 'pick' },
304
- { label: ( localize(8854, 'Do not trust')), run: () => 'none' },
302
+ { label: ( localize(8857, 'Trust')), run: () => 'all' },
303
+ { label: ( localize(8861, 'Pick Trusted')), run: () => 'pick' },
304
+ { label: ( localize(8858, 'Do not trust')), run: () => 'none' },
305
305
  ],
306
306
  });
307
307
  if (result === undefined) {
@@ -440,7 +440,7 @@ let McpRegistry = class McpRegistry extends Disposable {
440
440
  }
441
441
  this._notificationService.notify({
442
442
  severity: Severity.Error,
443
- message: ( localize(8858, 'Error starting {0}: {1}', definition.label, String(e))),
443
+ message: ( localize(8862, 'Error starting {0}: {1}', definition.label, String(e))),
444
444
  actions: {
445
445
  primary: collection.presentation?.origin && [
446
446
  {
@@ -448,7 +448,7 @@ let McpRegistry = class McpRegistry extends Disposable {
448
448
  class: undefined,
449
449
  enabled: true,
450
450
  tooltip: '',
451
- label: ( localize(8859, 'Open Configuration')),
451
+ label: ( localize(8863, 'Open Configuration')),
452
452
  run: () => this._editorService.openEditor({
453
453
  resource: collection.presentation.origin,
454
454
  options: { selection: definition.presentation?.origin?.range }
@@ -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(8860, '{0} total requests in the last 7 days.', total)));
44
+ parts.push(( localize(8864, '{0} total requests in the last 7 days.', total)));
45
45
  parts.push(this._formatRecentRequests(record));
46
46
  return parts.join('\n');
47
47
  }
@@ -106,11 +106,11 @@ let McpSamplingService = class McpSamplingService extends Disposable {
106
106
  const model = await this._getMatchingModelInner(opts.server, opts.isDuringToolCall, opts.params.modelPreferences);
107
107
  if (model === ModelMatch.UnsureAllowedDuringChat) {
108
108
  const retry = await this._showContextual(opts.isDuringToolCall, ( localize(
109
- 8861,
109
+ 8865,
110
110
  'Allow MCP tools from "{0}" to make LLM requests?',
111
111
  opts.server.definition.label
112
112
  )), ( localize(
113
- 8862,
113
+ 8866,
114
114
  '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?',
115
115
  opts.server.definition.label
116
116
  )), this.allowButtons(opts.server, 'allowedDuringChat'));
@@ -121,11 +121,11 @@ let McpSamplingService = class McpSamplingService extends Disposable {
121
121
  }
122
122
  else if (model === ModelMatch.UnsureAllowedOutsideChat) {
123
123
  const retry = await this._showContextual(opts.isDuringToolCall, ( localize(
124
- 8863,
124
+ 8867,
125
125
  'Allow MCP server "{0}" to make LLM requests?',
126
126
  opts.server.definition.label
127
127
  )), ( localize(
128
- 8864,
128
+ 8868,
129
129
  '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?',
130
130
  opts.server.definition.label
131
131
  )), this.allowButtons(opts.server, 'allowedOutsideChat'));
@@ -141,12 +141,12 @@ let McpSamplingService = class McpSamplingService extends Disposable {
141
141
  const newlyPickedModels = opts.isDuringToolCall
142
142
  ? await this._commandService.executeCommand(McpCommandIds.ConfigureSamplingModels, opts.server)
143
143
  : await this._notify(( localize(
144
- 8865,
144
+ 8869,
145
145
  'MCP server "{0}" triggered a language model request, but it has no allowlisted models.',
146
146
  opts.server.definition.label
147
147
  )), {
148
- [( localize(8866, 'Configure'))]: () => this._commandService.executeCommand(McpCommandIds.ConfigureSamplingModels, opts.server),
149
- [( localize(8867, 'Cancel'))]: () => Promise.resolve(undefined),
148
+ [( localize(8870, 'Configure'))]: () => this._commandService.executeCommand(McpCommandIds.ConfigureSamplingModels, opts.server),
149
+ [( localize(8871, 'Cancel'))]: () => Promise.resolve(undefined),
150
150
  });
151
151
  if (newlyPickedModels) {
152
152
  return this._getMatchingModel(opts);
@@ -157,19 +157,19 @@ let McpSamplingService = class McpSamplingService extends Disposable {
157
157
  }
158
158
  allowButtons(server, key) {
159
159
  return {
160
- [( localize(8868, 'Allow in this Session'))]: async () => {
160
+ [( localize(8872, 'Allow in this Session'))]: async () => {
161
161
  this._sessionSets[key].set(server.definition.id, true);
162
162
  return true;
163
163
  },
164
- [( localize(8869, 'Always'))]: async () => {
164
+ [( localize(8873, 'Always'))]: async () => {
165
165
  await this.updateConfig(server, c => c[key] = true);
166
166
  return true;
167
167
  },
168
- [( localize(8870, 'Not Now'))]: async () => {
168
+ [( localize(8874, 'Not Now'))]: async () => {
169
169
  this._sessionSets[key].set(server.definition.id, false);
170
170
  return false;
171
171
  },
172
- [( localize(8871, 'Never'))]: async () => {
172
+ [( localize(8875, 'Never'))]: async () => {
173
173
  await this.updateConfig(server, c => c[key] = false);
174
174
  return false;
175
175
  },
@@ -426,29 +426,29 @@ let McpServer = McpServer_1 = class McpServer extends Disposable {
426
426
  break;
427
427
  }
428
428
  const options = [{
429
- label: ( localize(8872, "Show Output")),
429
+ label: ( localize(8876, "Show Output")),
430
430
  run: () => this.showOutput(),
431
431
  }];
432
432
  if (cnx.definition.devMode?.debug?.type === 'debugpy' && debug) {
433
433
  this._notificationService.prompt(Severity.Error, ( localize(
434
- 8873,
434
+ 8877,
435
435
  'The command "{0}" was not found. You can specify the path to debugpy in the `dev.debug.debugpyPath` option.',
436
436
  cnx.launchDefinition.command,
437
437
  cnx.definition.label
438
438
  )), [...options, {
439
- label: ( localize(8874, 'View Docs')),
439
+ label: ( localize(8878, 'View Docs')),
440
440
  run: () => this._openerService.open(( URI.parse('https://aka.ms/vscode-mcp-install/debugpy'))),
441
441
  }]);
442
442
  return;
443
443
  }
444
444
  if (docsLink) {
445
445
  options.push({
446
- label: ( localize(8875, 'Install {0}', cnx.launchDefinition.command)),
446
+ label: ( localize(8879, 'Install {0}', cnx.launchDefinition.command)),
447
447
  run: () => this._openerService.open(( URI.parse(docsLink))),
448
448
  });
449
449
  }
450
450
  this._notificationService.prompt(Severity.Error, ( localize(
451
- 8876,
451
+ 8880,
452
452
  'The command "{0}" needed to run {1} was not found.',
453
453
  cnx.launchDefinition.command,
454
454
  cnx.definition.label
@@ -456,7 +456,7 @@ let McpServer = McpServer_1 = class McpServer extends Disposable {
456
456
  }
457
457
  else {
458
458
  this._notificationService.warn(( localize(
459
- 8877,
459
+ 8881,
460
460
  'The MCP server {0} could not be started: {1}',
461
461
  cnx.definition.label,
462
462
  error.message
@@ -522,7 +522,7 @@ let McpServer = McpServer_1 = class McpServer extends Disposable {
522
522
  const validated = [];
523
523
  for (const [i, result] of validations.entries()) {
524
524
  if ('error' in result) {
525
- error += ( localize(8878, 'Tool `{0}` has invalid JSON parameters:', tools[i].name)) + '\n';
525
+ error += ( localize(8882, 'Tool `{0}` has invalid JSON parameters:', tools[i].name)) + '\n';
526
526
  for (const message of result.error) {
527
527
  error += `\t- ${message}\n`;
528
528
  }
@@ -785,7 +785,7 @@ function warnInvalidTools(instaService, serverName, errorText) {
785
785
  notificationService.notify({
786
786
  severity: Severity.Warning,
787
787
  message: ( localize(
788
- 8879,
788
+ 8883,
789
789
  'MCP server `{0}` has tools with invalid parameters which will be omitted.',
790
790
  serverName
791
791
  )),
@@ -795,7 +795,7 @@ function warnInvalidTools(instaService, serverName, errorText) {
795
795
  enabled: true,
796
796
  id: 'mcpBadSchema.show',
797
797
  tooltip: '',
798
- label: ( localize(8880, 'Show')),
798
+ label: ( localize(8884, 'Show')),
799
799
  run: () => {
800
800
  editorService.openEditor({
801
801
  resource: undefined,
@@ -35,7 +35,7 @@ let McpServerConnection = class McpServerConnection extends Disposable {
35
35
  }
36
36
  this._launch.value = undefined;
37
37
  this._state.set({ state: McpConnectionState.Kind.Starting }, undefined);
38
- this._logger.info(( localize(8881, 'Starting server {0}', this.definition.label)));
38
+ this._logger.info(( localize(8885, 'Starting server {0}', this.definition.label)));
39
39
  try {
40
40
  const launch = this._delegate.start(this._collection, this.definition, this.launchDefinition, { errorOnUserInteraction: this._errorOnUserInteraction });
41
41
  this._launch.value = this.adoptLaunch(launch, methods);
@@ -62,7 +62,7 @@ let McpServerConnection = class McpServerConnection extends Disposable {
62
62
  store.add(autorun(reader => {
63
63
  const state = launch.state.read(reader);
64
64
  this._state.set(state, undefined);
65
- this._logger.info(( localize(8882, 'Connection state: {0}', (McpConnectionState.toString(state)))));
65
+ this._logger.info(( localize(8886, 'Connection state: {0}', (McpConnectionState.toString(state)))));
66
66
  if (state.state === McpConnectionState.Kind.Running && !didStart) {
67
67
  didStart = true;
68
68
  McpServerRequestHandler.create(this._instantiationService, {
@@ -96,7 +96,7 @@ let McpServerConnection = class McpServerConnection extends Disposable {
96
96
  return { dispose: () => store.dispose(), object: launch };
97
97
  }
98
98
  async stop() {
99
- this._logger.info(( localize(8883, 'Stopping server {0}', this.definition.label)));
99
+ this._logger.info(( localize(8887, 'Stopping server {0}', this.definition.label)));
100
100
  this._launch.value?.object.stop();
101
101
  await this._waitForState(McpConnectionState.Kind.Stopped, McpConnectionState.Kind.Error);
102
102
  }
@@ -112,7 +112,7 @@ let AuthenticationMcpService = class AuthenticationMcpService extends Disposable
112
112
  numberOfRequests += ( Object.keys(accessRequest)).length;
113
113
  });
114
114
  if (numberOfRequests > 0) {
115
- const badge = ( new NumberBadge(numberOfRequests, () => ( localize(13505, "Sign in requested"))));
115
+ const badge = ( new NumberBadge(numberOfRequests, () => ( localize(13508, "Sign in requested"))));
116
116
  this._accountBadgeDisposable.value = this.activityService.showAccountsActivity({ badge });
117
117
  }
118
118
  }
@@ -173,7 +173,7 @@ let AuthenticationMcpService = class AuthenticationMcpService extends Disposable
173
173
  const { result } = await this.dialogService.prompt({
174
174
  type: Severity.Info,
175
175
  message: ( localize(
176
- 13506,
176
+ 13509,
177
177
  "The MCP server '{0}' wants to access the {1} account '{2}'.",
178
178
  mcpServerName,
179
179
  provider.label,
@@ -181,11 +181,11 @@ let AuthenticationMcpService = class AuthenticationMcpService extends Disposable
181
181
  )),
182
182
  buttons: [
183
183
  {
184
- label: ( localize(13507, "&&Allow")),
184
+ label: ( localize(13510, "&&Allow")),
185
185
  run: () => SessionPromptChoice.Allow
186
186
  },
187
187
  {
188
- label: ( localize(13508, "&&Deny")),
188
+ label: ( localize(13511, "&&Deny")),
189
189
  run: () => SessionPromptChoice.Deny
190
190
  }
191
191
  ],
@@ -221,16 +221,16 @@ let AuthenticationMcpService = class AuthenticationMcpService extends Disposable
221
221
  items.push({ label: account.label, account });
222
222
  }
223
223
  });
224
- items.push({ label: ( localize(13509, "Sign in to another account")) });
224
+ items.push({ label: ( localize(13512, "Sign in to another account")) });
225
225
  quickPick.items = items;
226
226
  quickPick.title = ( localize(
227
- 13510,
227
+ 13513,
228
228
  "The MCP server '{0}' wants to access a {1} account",
229
229
  mcpServerName,
230
230
  this._authenticationService.getProvider(providerId).label
231
231
  ));
232
232
  quickPick.placeholder = ( localize(
233
- 13511,
233
+ 13514,
234
234
  "Select an account for '{0}' to use or Esc to cancel",
235
235
  mcpServerName
236
236
  ));
@@ -302,7 +302,7 @@ let AuthenticationMcpService = class AuthenticationMcpService extends Disposable
302
302
  group: '3_accessRequests',
303
303
  command: {
304
304
  id: `${providerId}${mcpServerId}Access`,
305
- title: ( localize(13512, "Grant access to {0} for {1}... (1)", provider.label, mcpServerName))
305
+ title: ( localize(13515, "Grant access to {0} for {1}... (1)", provider.label, mcpServerName))
306
306
  }
307
307
  }));
308
308
  const accessCommand = CommandsRegistry.registerCommand({
@@ -346,7 +346,7 @@ let AuthenticationMcpService = class AuthenticationMcpService extends Disposable
346
346
  group: '2_signInRequests',
347
347
  command: {
348
348
  id: commandId,
349
- title: ( localize(13513, "Sign in with {0} to use {1} (1)", provider.label, mcpServerName))
349
+ title: ( localize(13516, "Sign in with {0} to use {1} (1)", provider.label, mcpServerName))
350
350
  }
351
351
  }));
352
352
  const signInCommand = CommandsRegistry.registerCommand({