@codingame/monaco-vscode-mcp-service-override 21.3.1 → 21.3.3

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 (26) 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 +54 -54
  5. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpElicitationService.js +17 -17
  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 +26 -26
  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 +4 -4
  13. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerWidgets.js +5 -5
  14. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServersView.js +8 -8
  15. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpWorkbenchService.js +5 -5
  16. package/vscode/src/vs/workbench/contrib/mcp/common/discovery/extensionMcpDiscovery.js +3 -3
  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/contrib/mcp/common/mcpService.js +3 -3
  26. package/vscode/src/vs/workbench/services/authentication/browser/authenticationMcpService.js +9 -9
@@ -104,11 +104,11 @@ let McpSamplingService = class McpSamplingService extends Disposable {
104
104
  const model = await this._getMatchingModelInner(opts.server, opts.isDuringToolCall, opts.params.modelPreferences);
105
105
  if (model === ModelMatch.UnsureAllowedDuringChat) {
106
106
  const retry = await this._showContextual(opts.isDuringToolCall, ( localize(
107
- 8505,
107
+ 8511,
108
108
  'Allow MCP tools from "{0}" to make LLM requests?',
109
109
  opts.server.definition.label
110
110
  )), ( localize(
111
- 8506,
111
+ 8512,
112
112
  '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?',
113
113
  opts.server.definition.label
114
114
  )), this.allowButtons(opts.server, 'allowedDuringChat'));
@@ -119,11 +119,11 @@ let McpSamplingService = class McpSamplingService extends Disposable {
119
119
  }
120
120
  else if (model === ModelMatch.UnsureAllowedOutsideChat) {
121
121
  const retry = await this._showContextual(opts.isDuringToolCall, ( localize(
122
- 8507,
122
+ 8513,
123
123
  'Allow MCP server "{0}" to make LLM requests?',
124
124
  opts.server.definition.label
125
125
  )), ( localize(
126
- 8508,
126
+ 8514,
127
127
  '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?',
128
128
  opts.server.definition.label
129
129
  )), this.allowButtons(opts.server, 'allowedOutsideChat'));
@@ -139,12 +139,12 @@ let McpSamplingService = class McpSamplingService extends Disposable {
139
139
  const newlyPickedModels = opts.isDuringToolCall
140
140
  ? await this._commandService.executeCommand(McpCommandIds.ConfigureSamplingModels, opts.server)
141
141
  : await this._notify(( localize(
142
- 8509,
142
+ 8515,
143
143
  'MCP server "{0}" triggered a language model request, but it has no allowlisted models.',
144
144
  opts.server.definition.label
145
145
  )), {
146
- [( localize(8510, 'Configure'))]: () => this._commandService.executeCommand(McpCommandIds.ConfigureSamplingModels, opts.server),
147
- [( localize(8511, 'Cancel'))]: () => Promise.resolve(undefined),
146
+ [( localize(8516, 'Configure'))]: () => this._commandService.executeCommand(McpCommandIds.ConfigureSamplingModels, opts.server),
147
+ [( localize(8517, 'Cancel'))]: () => Promise.resolve(undefined),
148
148
  });
149
149
  if (newlyPickedModels) {
150
150
  return this._getMatchingModel(opts);
@@ -155,19 +155,19 @@ let McpSamplingService = class McpSamplingService extends Disposable {
155
155
  }
156
156
  allowButtons(server, key) {
157
157
  return {
158
- [( localize(8512, 'Allow in this Session'))]: async () => {
158
+ [( localize(8518, 'Allow in this Session'))]: async () => {
159
159
  this._sessionSets[key].set(server.definition.id, true);
160
160
  return true;
161
161
  },
162
- [( localize(8513, 'Always'))]: async () => {
162
+ [( localize(8519, 'Always'))]: async () => {
163
163
  await this.updateConfig(server, c => c[key] = true);
164
164
  return true;
165
165
  },
166
- [( localize(8514, 'Not Now'))]: async () => {
166
+ [( localize(8520, 'Not Now'))]: async () => {
167
167
  this._sessionSets[key].set(server.definition.id, false);
168
168
  return false;
169
169
  },
170
- [( localize(8515, 'Never'))]: async () => {
170
+ [( localize(8521, 'Never'))]: async () => {
171
171
  await this.updateConfig(server, c => c[key] = false);
172
172
  return false;
173
173
  },
@@ -407,29 +407,29 @@ let McpServer = McpServer_1 = class McpServer extends Disposable {
407
407
  break;
408
408
  }
409
409
  const options = [{
410
- label: ( localize(8516, "Show Output")),
410
+ label: ( localize(8522, "Show Output")),
411
411
  run: () => this.showOutput(),
412
412
  }];
413
413
  if (cnx.definition.devMode?.debug?.type === 'debugpy' && debug) {
414
414
  this._notificationService.prompt(Severity.Error, ( localize(
415
- 8517,
415
+ 8523,
416
416
  'The command "{0}" was not found. You can specify the path to debugpy in the `dev.debug.debugpyPath` option.',
417
417
  cnx.launchDefinition.command,
418
418
  cnx.definition.label
419
419
  )), [...options, {
420
- label: ( localize(8518, 'View Docs')),
420
+ label: ( localize(8524, 'View Docs')),
421
421
  run: () => this._openerService.open(( URI.parse('https://aka.ms/vscode-mcp-install/debugpy'))),
422
422
  }]);
423
423
  return;
424
424
  }
425
425
  if (docsLink) {
426
426
  options.push({
427
- label: ( localize(8519, 'Install {0}', cnx.launchDefinition.command)),
427
+ label: ( localize(8525, 'Install {0}', cnx.launchDefinition.command)),
428
428
  run: () => this._openerService.open(( URI.parse(docsLink))),
429
429
  });
430
430
  }
431
431
  this._notificationService.prompt(Severity.Error, ( localize(
432
- 8520,
432
+ 8526,
433
433
  'The command "{0}" needed to run {1} was not found.',
434
434
  cnx.launchDefinition.command,
435
435
  cnx.definition.label
@@ -437,7 +437,7 @@ let McpServer = McpServer_1 = class McpServer extends Disposable {
437
437
  }
438
438
  else {
439
439
  this._notificationService.warn(( localize(
440
- 8521,
440
+ 8527,
441
441
  'The MCP server {0} could not be started: {1}',
442
442
  cnx.definition.label,
443
443
  error.message
@@ -488,7 +488,7 @@ let McpServer = McpServer_1 = class McpServer extends Disposable {
488
488
  const validated = [];
489
489
  for (const [i, result] of validations.entries()) {
490
490
  if ('error' in result) {
491
- error += ( localize(8522, 'Tool `{0}` has invalid JSON parameters:', tools[i].name)) + '\n';
491
+ error += ( localize(8528, 'Tool `{0}` has invalid JSON parameters:', tools[i].name)) + '\n';
492
492
  for (const message of result.error) {
493
493
  error += `\t- ${message}\n`;
494
494
  }
@@ -708,7 +708,7 @@ function warnInvalidTools(instaService, serverName, errorText) {
708
708
  notificationService.notify({
709
709
  severity: Severity.Warning,
710
710
  message: ( localize(
711
- 8523,
711
+ 8529,
712
712
  'MCP server `{0}` has tools with invalid parameters which will be omitted.',
713
713
  serverName
714
714
  )),
@@ -718,7 +718,7 @@ function warnInvalidTools(instaService, serverName, errorText) {
718
718
  enabled: true,
719
719
  id: 'mcpBadSchema.show',
720
720
  tooltip: '',
721
- label: ( localize(8524, 'Show')),
721
+ label: ( localize(8530, 'Show')),
722
722
  run: () => {
723
723
  editorService.openEditor({
724
724
  resource: undefined,
@@ -34,7 +34,7 @@ let McpServerConnection = class McpServerConnection extends Disposable {
34
34
  }
35
35
  this._launch.value = undefined;
36
36
  this._state.set({ state: McpConnectionState.Kind.Starting }, undefined);
37
- this._logger.info(( localize(8525, 'Starting server {0}', this.definition.label)));
37
+ this._logger.info(( localize(8531, 'Starting server {0}', this.definition.label)));
38
38
  try {
39
39
  const launch = this._delegate.start(this._collection, this.definition, this.launchDefinition);
40
40
  this._launch.value = this.adoptLaunch(launch, methods);
@@ -61,7 +61,7 @@ let McpServerConnection = class McpServerConnection extends Disposable {
61
61
  store.add(autorun(reader => {
62
62
  const state = launch.state.read(reader);
63
63
  this._state.set(state, undefined);
64
- this._logger.info(( localize(8526, 'Connection state: {0}', (McpConnectionState.toString(state)))));
64
+ this._logger.info(( localize(8532, 'Connection state: {0}', (McpConnectionState.toString(state)))));
65
65
  if (state.state === McpConnectionState.Kind.Running && !didStart) {
66
66
  didStart = true;
67
67
  McpServerRequestHandler.create(this._instantiationService, {
@@ -95,7 +95,7 @@ let McpServerConnection = class McpServerConnection extends Disposable {
95
95
  return { dispose: () => store.dispose(), object: launch };
96
96
  }
97
97
  async stop() {
98
- this._logger.info(( localize(8527, 'Stopping server {0}', this.definition.label)));
98
+ this._logger.info(( localize(8533, 'Stopping server {0}', this.definition.label)));
99
99
  this._launch.value?.object.stop();
100
100
  await this._waitForState(McpConnectionState.Kind.Stopped, McpConnectionState.Kind.Error);
101
101
  }
@@ -67,13 +67,13 @@ let McpService = class McpService extends Disposable {
67
67
  delay: 5_000,
68
68
  total: todo.length,
69
69
  buttons: [
70
- ( localize(8528, 'Skip Waiting')),
71
- ( localize(8529, 'Configure')),
70
+ ( localize(8534, 'Skip Waiting')),
71
+ ( localize(8535, 'Configure')),
72
72
  ]
73
73
  }, report => {
74
74
  const remaining = ( new Set(todo));
75
75
  const doReport = () => report.report({ message: ( localize(
76
- 8530,
76
+ 8536,
77
77
  'Waiting for MCP server "{0}" to start...',
78
78
  ( [...remaining].map(r => r.definition.label)).join('", "')
79
79
  )), total: todo.length, increment: 1 });
@@ -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(13055, "Sign in requested"))));
115
+ const badge = ( new NumberBadge(numberOfRequests, () => ( localize(13068, "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
- 13056,
176
+ 13069,
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(13057, "&&Allow")),
184
+ label: ( localize(13070, "&&Allow")),
185
185
  run: () => SessionPromptChoice.Allow
186
186
  },
187
187
  {
188
- label: ( localize(13058, "&&Deny")),
188
+ label: ( localize(13071, "&&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(13059, "Sign in to another account")) });
224
+ items.push({ label: ( localize(13072, "Sign in to another account")) });
225
225
  quickPick.items = items;
226
226
  quickPick.title = ( localize(
227
- 13060,
227
+ 13073,
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
- 13061,
233
+ 13074,
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(13062, "Grant access to {0} for {1}... (1)", provider.label, mcpServerName))
305
+ title: ( localize(13075, "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(13063, "Sign in with {0} to use {1} (1)", provider.label, mcpServerName))
349
+ title: ( localize(13076, "Sign in with {0} to use {1} (1)", provider.label, mcpServerName))
350
350
  }
351
351
  }));
352
352
  const signInCommand = CommandsRegistry.registerCommand({