@codingame/monaco-vscode-mcp-service-override 24.3.0 → 25.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/vscode/src/vs/platform/mcp/common/allowedMcpServersService.js +1 -1
- package/vscode/src/vs/platform/mcp/common/mcpGalleryService.js +2 -2
- package/vscode/src/vs/platform/mcp/common/mcpManagementService.js +1 -1
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcp.contribution.js +3 -3
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpAddContextContribution.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpAddContextContribution.js +3 -3
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpCommands.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpCommands.js +62 -59
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpElicitationService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpElicitationService.js +30 -30
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpLanguageFeatures.js +18 -18
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpMigration.js +5 -5
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpResourceQuickAccess.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpResourceQuickAccess.js +9 -9
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerActions.js +32 -32
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerEditor.js +36 -36
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerIcons.js +5 -5
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerWidgets.js +5 -5
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServersView.js +18 -18
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpWorkbenchService.js +8 -8
- package/vscode/src/vs/workbench/contrib/mcp/common/discovery/extensionMcpDiscovery.js +4 -4
- package/vscode/src/vs/workbench/contrib/mcp/common/discovery/nativeMcpDiscoveryAbstract.js +1 -1
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpContextKeys.js +4 -4
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpLanguageModelToolContribution.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpLanguageModelToolContribution.js +8 -8
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpRegistry.js +12 -12
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpSamplingLog.js +1 -1
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpSamplingService.js +11 -11
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpServer.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpServer.js +18 -13
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpServerConnection.js +3 -3
- package/vscode/src/vs/workbench/services/authentication/browser/authenticationMcpService.js +9 -9
|
@@ -13,18 +13,18 @@ import '@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/noti
|
|
|
13
13
|
import { INotificationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/notification.service';
|
|
14
14
|
import { IOpenerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service';
|
|
15
15
|
import { IQuickInputService } from '@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickInput.service';
|
|
16
|
-
import { ChatElicitationRequestPart } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/
|
|
17
|
-
import { ChatModel } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatModel';
|
|
18
|
-
import { ElicitationState } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService';
|
|
19
|
-
import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService.service';
|
|
20
|
-
import { LocalChatSessionUri } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatUri';
|
|
16
|
+
import { ChatElicitationRequestPart } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatProgressTypes/chatElicitationRequestPart';
|
|
17
|
+
import { ChatModel } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatModel';
|
|
18
|
+
import { ElicitationState } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService';
|
|
19
|
+
import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service';
|
|
20
|
+
import { LocalChatSessionUri } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatUri';
|
|
21
21
|
import { MpcResponseError, ElicitationKind, McpConnectionState } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpTypes';
|
|
22
22
|
import { mcpServerToSourceData } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpTypesUtils';
|
|
23
23
|
import { MCP } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/modelContextProtocol';
|
|
24
24
|
import Severity from '@codingame/monaco-vscode-api/vscode/vs/base/common/severity';
|
|
25
25
|
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
26
26
|
|
|
27
|
-
const noneItem = { id: undefined, label: ( localize(
|
|
27
|
+
const noneItem = { id: undefined, label: ( localize(8828, 'None')), description: ( localize(8829, 'No selection')), alwaysShow: true };
|
|
28
28
|
function isFormElicitation(params) {
|
|
29
29
|
return params.mode === 'form' || (params.mode === undefined && !!params.requestedSchema);
|
|
30
30
|
}
|
|
@@ -76,7 +76,7 @@ let McpElicitationService = class McpElicitationService {
|
|
|
76
76
|
if (chatModel instanceof ChatModel) {
|
|
77
77
|
const request = chatModel.getRequests().at(-1);
|
|
78
78
|
if (request) {
|
|
79
|
-
const part = ( new ChatElicitationRequestPart(( localize(
|
|
79
|
+
const part = ( new ChatElicitationRequestPart(( localize(8830, 'Request for Input')), elicitation.message, ( localize(8831, "{0} (MCP Server)", server.definition.label)), ( localize(8832, 'Respond')), ( localize(8833, 'Cancel')), async () => {
|
|
80
80
|
const p = this._doElicitForm(elicitation, token);
|
|
81
81
|
resolve(p);
|
|
82
82
|
const result = await p;
|
|
@@ -92,11 +92,11 @@ let McpElicitationService = class McpElicitationService {
|
|
|
92
92
|
else {
|
|
93
93
|
const handle = this._notificationService.notify({
|
|
94
94
|
message: elicitation.message,
|
|
95
|
-
source: ( localize(
|
|
95
|
+
source: ( localize(8834, 'MCP Server ({0})', server.definition.label)),
|
|
96
96
|
severity: Severity.Info,
|
|
97
97
|
actions: {
|
|
98
|
-
primary: [store.add(( new Action('mcp.elicit.give', ( localize(
|
|
99
|
-
secondary: [store.add(( new Action('mcp.elicit.cancel', ( localize(
|
|
98
|
+
primary: [store.add(( new Action('mcp.elicit.give', ( localize(8835, 'Respond')), undefined, true, () => resolve(this._doElicitForm(elicitation, token)))))],
|
|
99
|
+
secondary: [store.add(( new Action('mcp.elicit.cancel', ( localize(8836, 'Cancel')), undefined, true, () => resolve({ action: 'decline' }))))],
|
|
100
100
|
}
|
|
101
101
|
});
|
|
102
102
|
store.add(handle.onDidClose(() => resolve({ action: 'cancel' })));
|
|
@@ -130,9 +130,9 @@ let McpElicitationService = class McpElicitationService {
|
|
|
130
130
|
if (chatModel instanceof ChatModel) {
|
|
131
131
|
const request = chatModel.getRequests().at(-1);
|
|
132
132
|
if (request) {
|
|
133
|
-
const part = ( new ChatElicitationRequestPart(( localize(
|
|
134
|
-
.appendMarkdown('\n\n' + ( localize(
|
|
135
|
-
.appendCodeblock('', elicitation.url), ( localize(
|
|
133
|
+
const part = ( new ChatElicitationRequestPart(( localize(8837, 'Authorization Required')), ( new MarkdownString()).appendText(elicitation.message)
|
|
134
|
+
.appendMarkdown('\n\n' + ( localize(8838, 'Open this URL?')))
|
|
135
|
+
.appendCodeblock('', elicitation.url), ( localize(8831, "{0} (MCP Server)", server.definition.label)), ( localize(8839, 'Open {0}', ( URI.parse(elicitation.url)).authority)), ( localize(8833, 'Cancel')), async () => {
|
|
136
136
|
const result = await this._doElicitUrl(elicitation, token);
|
|
137
137
|
resolve(result);
|
|
138
138
|
completePromise.then(() => part.hide());
|
|
@@ -146,12 +146,12 @@ let McpElicitationService = class McpElicitationService {
|
|
|
146
146
|
}
|
|
147
147
|
else {
|
|
148
148
|
const handle = this._notificationService.notify({
|
|
149
|
-
message: elicitation.message + ' ' + ( localize(
|
|
150
|
-
source: ( localize(
|
|
149
|
+
message: elicitation.message + ' ' + ( localize(8840, 'This will open {0}', elicitation.url)),
|
|
150
|
+
source: ( localize(8834, 'MCP Server ({0})', server.definition.label)),
|
|
151
151
|
severity: Severity.Info,
|
|
152
152
|
actions: {
|
|
153
|
-
primary: [store.add(( new Action('mcp.elicit.url.open2', ( localize(
|
|
154
|
-
secondary: [store.add(( new Action('mcp.elicit.cancel', ( localize(
|
|
153
|
+
primary: [store.add(( new Action('mcp.elicit.url.open2', ( localize(8841, 'Open URL')), undefined, true, () => resolve(this._doElicitUrl(elicitation, token)))))],
|
|
154
|
+
secondary: [store.add(( new Action('mcp.elicit.cancel', ( localize(8836, 'Cancel')), undefined, true, () => resolve({ action: 'decline' }))))],
|
|
155
155
|
}
|
|
156
156
|
});
|
|
157
157
|
store.add(handle.onDidClose(() => resolve({ action: 'cancel' })));
|
|
@@ -256,7 +256,7 @@ let McpElicitationService = class McpElicitationService {
|
|
|
256
256
|
_getFieldPlaceholder(schema, required) {
|
|
257
257
|
let placeholder = schema.description || '';
|
|
258
258
|
if (!required) {
|
|
259
|
-
placeholder = placeholder ? `${placeholder} (${( localize(
|
|
259
|
+
placeholder = placeholder ? `${placeholder} (${( localize(8842, 'Optional'))})` : ( localize(8842, 'Optional'));
|
|
260
260
|
}
|
|
261
261
|
return placeholder;
|
|
262
262
|
}
|
|
@@ -330,7 +330,7 @@ let McpElicitationService = class McpElicitationService {
|
|
|
330
330
|
else {
|
|
331
331
|
quickPick.validationMessage = '';
|
|
332
332
|
if (schema.default) {
|
|
333
|
-
items.push({ id: '$default', label: `${schema.default}`, description: ( localize(
|
|
333
|
+
items.push({ id: '$default', label: `${schema.default}`, description: ( localize(8843, 'Default value')) });
|
|
334
334
|
}
|
|
335
335
|
}
|
|
336
336
|
if (quickPick.validationMessage) {
|
|
@@ -382,10 +382,10 @@ let McpElicitationService = class McpElicitationService {
|
|
|
382
382
|
}
|
|
383
383
|
_validateString(value, schema) {
|
|
384
384
|
if (schema.minLength && value.length < schema.minLength) {
|
|
385
|
-
return { isValid: false, message: ( localize(
|
|
385
|
+
return { isValid: false, message: ( localize(8844, 'Minimum length is {0}', schema.minLength)) };
|
|
386
386
|
}
|
|
387
387
|
if (schema.maxLength && value.length > schema.maxLength) {
|
|
388
|
-
return { isValid: false, message: ( localize(
|
|
388
|
+
return { isValid: false, message: ( localize(8845, 'Maximum length is {0}', schema.maxLength)) };
|
|
389
389
|
}
|
|
390
390
|
if (schema.format) {
|
|
391
391
|
const formatValid = this._validateStringFormat(value, schema.format);
|
|
@@ -400,29 +400,29 @@ let McpElicitationService = class McpElicitationService {
|
|
|
400
400
|
case 'email':
|
|
401
401
|
return value.includes('@')
|
|
402
402
|
? { isValid: true }
|
|
403
|
-
: { isValid: false, message: ( localize(
|
|
403
|
+
: { isValid: false, message: ( localize(8846, 'Please enter a valid email address')) };
|
|
404
404
|
case 'uri':
|
|
405
405
|
if (URL.canParse(value)) {
|
|
406
406
|
return { isValid: true };
|
|
407
407
|
}
|
|
408
408
|
else {
|
|
409
|
-
return { isValid: false, message: ( localize(
|
|
409
|
+
return { isValid: false, message: ( localize(8847, 'Please enter a valid URI')) };
|
|
410
410
|
}
|
|
411
411
|
case 'date': {
|
|
412
412
|
const dateRegex = /^\d{4}-\d{2}-\d{2}$/;
|
|
413
413
|
if (!dateRegex.test(value)) {
|
|
414
|
-
return { isValid: false, message: ( localize(
|
|
414
|
+
return { isValid: false, message: ( localize(8848, 'Please enter a valid date (YYYY-MM-DD)')) };
|
|
415
415
|
}
|
|
416
416
|
const date = ( new Date(value));
|
|
417
417
|
return !isNaN(date.getTime())
|
|
418
418
|
? { isValid: true }
|
|
419
|
-
: { isValid: false, message: ( localize(
|
|
419
|
+
: { isValid: false, message: ( localize(8848, 'Please enter a valid date (YYYY-MM-DD)')) };
|
|
420
420
|
}
|
|
421
421
|
case 'date-time': {
|
|
422
422
|
const dateTime = ( new Date(value));
|
|
423
423
|
return !isNaN(dateTime.getTime())
|
|
424
424
|
? { isValid: true }
|
|
425
|
-
: { isValid: false, message: ( localize(
|
|
425
|
+
: { isValid: false, message: ( localize(8849, 'Please enter a valid date-time')) };
|
|
426
426
|
}
|
|
427
427
|
default:
|
|
428
428
|
return { isValid: true };
|
|
@@ -431,16 +431,16 @@ let McpElicitationService = class McpElicitationService {
|
|
|
431
431
|
_validateNumber(value, schema) {
|
|
432
432
|
const parsed = Number(value);
|
|
433
433
|
if (isNaN(parsed)) {
|
|
434
|
-
return { isValid: false, message: ( localize(
|
|
434
|
+
return { isValid: false, message: ( localize(8850, 'Please enter a valid number')) };
|
|
435
435
|
}
|
|
436
436
|
if (schema.type === 'integer' && !Number.isInteger(parsed)) {
|
|
437
|
-
return { isValid: false, message: ( localize(
|
|
437
|
+
return { isValid: false, message: ( localize(8851, 'Please enter a valid integer')) };
|
|
438
438
|
}
|
|
439
439
|
if (schema.minimum !== undefined && parsed < schema.minimum) {
|
|
440
|
-
return { isValid: false, message: ( localize(
|
|
440
|
+
return { isValid: false, message: ( localize(8852, 'Minimum value is {0}', schema.minimum)) };
|
|
441
441
|
}
|
|
442
442
|
if (schema.maximum !== undefined && parsed > schema.maximum) {
|
|
443
|
-
return { isValid: false, message: ( localize(
|
|
443
|
+
return { isValid: false, message: ( localize(8853, 'Maximum value is {0}', schema.maximum)) };
|
|
444
444
|
}
|
|
445
445
|
return { isValid: true, parsedValue: parsed };
|
|
446
446
|
}
|
|
@@ -101,7 +101,7 @@ let McpLanguageFeatures = class McpLanguageFeatures extends Disposable {
|
|
|
101
101
|
diagnostics.push({
|
|
102
102
|
severity: MarkerSeverity.Warning,
|
|
103
103
|
message: ( localize(
|
|
104
|
-
|
|
104
|
+
8854,
|
|
105
105
|
'Variable `{0}` not found, did you mean ${{1}}?',
|
|
106
106
|
name,
|
|
107
107
|
getClosestMatchingVariable(name) + (arg ? `:${arg}` : '')
|
|
@@ -162,14 +162,14 @@ let McpLanguageFeatures = class McpLanguageFeatures extends Disposable {
|
|
|
162
162
|
range,
|
|
163
163
|
command: {
|
|
164
164
|
id: McpCommandIds.ShowOutput,
|
|
165
|
-
title: '$(error) ' + ( localize(
|
|
165
|
+
title: '$(error) ' + ( localize(8855, 'Error')),
|
|
166
166
|
arguments: [server.definition.id],
|
|
167
167
|
},
|
|
168
168
|
}, {
|
|
169
169
|
range,
|
|
170
170
|
command: {
|
|
171
171
|
id: McpCommandIds.RestartServer,
|
|
172
|
-
title: ( localize(
|
|
172
|
+
title: ( localize(8856, "Restart")),
|
|
173
173
|
arguments: [server.definition.id, { autoTrustChanges: true }],
|
|
174
174
|
},
|
|
175
175
|
});
|
|
@@ -178,7 +178,7 @@ let McpLanguageFeatures = class McpLanguageFeatures extends Disposable {
|
|
|
178
178
|
range,
|
|
179
179
|
command: {
|
|
180
180
|
id: McpCommandIds.RestartServer,
|
|
181
|
-
title: ( localize(
|
|
181
|
+
title: ( localize(8857, "Debug")),
|
|
182
182
|
arguments: [server.definition.id, { debug: true, autoTrustChanges: true }],
|
|
183
183
|
},
|
|
184
184
|
});
|
|
@@ -189,14 +189,14 @@ let McpLanguageFeatures = class McpLanguageFeatures extends Disposable {
|
|
|
189
189
|
range,
|
|
190
190
|
command: {
|
|
191
191
|
id: McpCommandIds.ShowOutput,
|
|
192
|
-
title: '$(loading~spin) ' + ( localize(
|
|
192
|
+
title: '$(loading~spin) ' + ( localize(8858, 'Starting')),
|
|
193
193
|
arguments: [server.definition.id],
|
|
194
194
|
},
|
|
195
195
|
}, {
|
|
196
196
|
range,
|
|
197
197
|
command: {
|
|
198
198
|
id: McpCommandIds.StopServer,
|
|
199
|
-
title: ( localize(
|
|
199
|
+
title: ( localize(8859, "Cancel")),
|
|
200
200
|
arguments: [server.definition.id],
|
|
201
201
|
},
|
|
202
202
|
});
|
|
@@ -206,21 +206,21 @@ let McpLanguageFeatures = class McpLanguageFeatures extends Disposable {
|
|
|
206
206
|
range,
|
|
207
207
|
command: {
|
|
208
208
|
id: McpCommandIds.ShowOutput,
|
|
209
|
-
title: '$(check) ' + ( localize(
|
|
209
|
+
title: '$(check) ' + ( localize(8860, 'Running')),
|
|
210
210
|
arguments: [server.definition.id],
|
|
211
211
|
},
|
|
212
212
|
}, {
|
|
213
213
|
range,
|
|
214
214
|
command: {
|
|
215
215
|
id: McpCommandIds.StopServer,
|
|
216
|
-
title: ( localize(
|
|
216
|
+
title: ( localize(8861, "Stop")),
|
|
217
217
|
arguments: [server.definition.id],
|
|
218
218
|
},
|
|
219
219
|
}, {
|
|
220
220
|
range,
|
|
221
221
|
command: {
|
|
222
222
|
id: McpCommandIds.RestartServer,
|
|
223
|
-
title: ( localize(
|
|
223
|
+
title: ( localize(8856, "Restart")),
|
|
224
224
|
arguments: [server.definition.id, { autoTrustChanges: true }],
|
|
225
225
|
},
|
|
226
226
|
});
|
|
@@ -229,7 +229,7 @@ let McpLanguageFeatures = class McpLanguageFeatures extends Disposable {
|
|
|
229
229
|
range,
|
|
230
230
|
command: {
|
|
231
231
|
id: McpCommandIds.RestartServer,
|
|
232
|
-
title: ( localize(
|
|
232
|
+
title: ( localize(8857, "Debug")),
|
|
233
233
|
arguments: [server.definition.id, { autoTrustChanges: true, debug: true }],
|
|
234
234
|
},
|
|
235
235
|
});
|
|
@@ -240,7 +240,7 @@ let McpLanguageFeatures = class McpLanguageFeatures extends Disposable {
|
|
|
240
240
|
range,
|
|
241
241
|
command: {
|
|
242
242
|
id: McpCommandIds.StartServer,
|
|
243
|
-
title: '$(debug-start) ' + ( localize(
|
|
243
|
+
title: '$(debug-start) ' + ( localize(8862, "Start")),
|
|
244
244
|
arguments: [server.definition.id, { autoTrustChanges: true }],
|
|
245
245
|
},
|
|
246
246
|
});
|
|
@@ -249,7 +249,7 @@ let McpLanguageFeatures = class McpLanguageFeatures extends Disposable {
|
|
|
249
249
|
range,
|
|
250
250
|
command: {
|
|
251
251
|
id: McpCommandIds.StartServer,
|
|
252
|
-
title: ( localize(
|
|
252
|
+
title: ( localize(8857, "Debug")),
|
|
253
253
|
arguments: [server.definition.id, { autoTrustChanges: true, debug: true }],
|
|
254
254
|
},
|
|
255
255
|
});
|
|
@@ -262,7 +262,7 @@ let McpLanguageFeatures = class McpLanguageFeatures extends Disposable {
|
|
|
262
262
|
range,
|
|
263
263
|
command: {
|
|
264
264
|
id: '',
|
|
265
|
-
title: ( localize(
|
|
265
|
+
title: ( localize(8863, '{0} tools', toolCount)),
|
|
266
266
|
}
|
|
267
267
|
});
|
|
268
268
|
}
|
|
@@ -272,7 +272,7 @@ let McpLanguageFeatures = class McpLanguageFeatures extends Disposable {
|
|
|
272
272
|
range,
|
|
273
273
|
command: {
|
|
274
274
|
id: McpCommandIds.StartPromptForServer,
|
|
275
|
-
title: ( localize(
|
|
275
|
+
title: ( localize(8864, '{0} prompts', promptCount)),
|
|
276
276
|
arguments: [server],
|
|
277
277
|
}
|
|
278
278
|
});
|
|
@@ -281,7 +281,7 @@ let McpLanguageFeatures = class McpLanguageFeatures extends Disposable {
|
|
|
281
281
|
range,
|
|
282
282
|
command: {
|
|
283
283
|
id: McpCommandIds.ServerOptions,
|
|
284
|
-
title: ( localize(
|
|
284
|
+
title: ( localize(8865, 'More...')),
|
|
285
285
|
arguments: [server.definition.id],
|
|
286
286
|
}
|
|
287
287
|
});
|
|
@@ -347,9 +347,9 @@ let McpLanguageFeatures = class McpLanguageFeatures extends Disposable {
|
|
|
347
347
|
}
|
|
348
348
|
function pushAnnotation(savedId, offset, saved) {
|
|
349
349
|
const tooltip = ( new MarkdownString([
|
|
350
|
-
createMarkdownCommandLink({ id: McpCommandIds.EditStoredInput, title: ( localize(
|
|
351
|
-
createMarkdownCommandLink({ id: McpCommandIds.RemoveStoredInput, title: ( localize(
|
|
352
|
-
createMarkdownCommandLink({ id: McpCommandIds.RemoveStoredInput, title: ( localize(
|
|
350
|
+
createMarkdownCommandLink({ id: McpCommandIds.EditStoredInput, title: ( localize(8866, 'Edit')), arguments: [savedId, model.uri, mcpConfigurationSection, inConfig.target] }),
|
|
351
|
+
createMarkdownCommandLink({ id: McpCommandIds.RemoveStoredInput, title: ( localize(8867, 'Clear')), arguments: [inConfig.scope, savedId] }),
|
|
352
|
+
createMarkdownCommandLink({ id: McpCommandIds.RemoveStoredInput, title: ( localize(8868, 'Clear All')), arguments: [inConfig.scope] }),
|
|
353
353
|
].join(' | '), { isTrusted: true }));
|
|
354
354
|
const hint = {
|
|
355
355
|
label: '= ' + (saved.input?.type === 'promptString' && saved.input.password ? '*'.repeat(10) : (saved.value || '')),
|
|
@@ -86,19 +86,19 @@ let McpConfigMigrationContribution = class McpConfigMigrationContribution extend
|
|
|
86
86
|
showMcpConfigErrorNotification(isRemote) {
|
|
87
87
|
const message = isRemote
|
|
88
88
|
? ( localize(
|
|
89
|
-
|
|
89
|
+
8869,
|
|
90
90
|
'MCP servers should no longer be configured in remote user settings. Use the dedicated MCP configuration instead.'
|
|
91
91
|
))
|
|
92
92
|
: ( localize(
|
|
93
|
-
|
|
93
|
+
8870,
|
|
94
94
|
'MCP servers should no longer be configured in user settings. Use the dedicated MCP configuration instead.'
|
|
95
95
|
));
|
|
96
96
|
const openConfigLabel = isRemote
|
|
97
|
-
? ( localize(
|
|
98
|
-
: ( localize(
|
|
97
|
+
? ( localize(8871, 'Open Remote User MCP Configuration'))
|
|
98
|
+
: ( localize(8872, 'Open User MCP Configuration'));
|
|
99
99
|
const commandId = isRemote ? McpCommandIds.OpenRemoteUserMcp : McpCommandIds.OpenUserMcp;
|
|
100
100
|
this.notificationService.prompt(Severity.Error, message, [{
|
|
101
|
-
label: ( localize(
|
|
101
|
+
label: ( localize(8873, 'Update Now')),
|
|
102
102
|
run: async () => {
|
|
103
103
|
await this.migrateMcpConfig();
|
|
104
104
|
await this.commandService.executeCommand(commandId);
|
|
@@ -11,10 +11,10 @@ import { IQuickInputService } from "@codingame/monaco-vscode-api/vscode/vs/platf
|
|
|
11
11
|
import { IEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service";
|
|
12
12
|
import { IViewsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/views/common/viewsService.service";
|
|
13
13
|
import { IChatWidgetService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service";
|
|
14
|
-
import { IChatAttachmentResolveService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatAttachmentResolveService.service";
|
|
14
|
+
import { IChatAttachmentResolveService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.service";
|
|
15
15
|
import { IMcpResource, IMcpResourceTemplate, IMcpServer } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpTypes";
|
|
16
16
|
import { IMcpService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpTypes.service";
|
|
17
|
-
import { ChatContextPickAttachment } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatContextPickService";
|
|
17
|
+
import { ChatContextPickAttachment } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/attachments/chatContextPickService";
|
|
18
18
|
export declare class McpResourcePickHelper extends Disposable {
|
|
19
19
|
private readonly _mcpService;
|
|
20
20
|
private readonly _fileService;
|
|
@@ -18,7 +18,7 @@ import { IQuickInputService } from '@codingame/monaco-vscode-api/vscode/vs/platf
|
|
|
18
18
|
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
19
19
|
import { IViewsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/views/common/viewsService.service';
|
|
20
20
|
import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
|
|
21
|
-
import { IChatAttachmentResolveService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatAttachmentResolveService.service';
|
|
21
|
+
import { IChatAttachmentResolveService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.service';
|
|
22
22
|
import { isMcpResourceTemplate, McpCapability, McpResourceURI, McpConnectionState } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpTypes';
|
|
23
23
|
import { IMcpService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpTypes.service';
|
|
24
24
|
import { McpIcons } from '../common/mcpIcons.js';
|
|
@@ -70,7 +70,7 @@ let McpResourcePickHelper = class McpResourcePickHelper extends Disposable {
|
|
|
70
70
|
id: resource.template.template,
|
|
71
71
|
label: resource.title || resource.name,
|
|
72
72
|
description: resource.description,
|
|
73
|
-
detail: ( localize(
|
|
73
|
+
detail: ( localize(8889, 'Resource template: {0}', resource.template.template)),
|
|
74
74
|
iconPath,
|
|
75
75
|
};
|
|
76
76
|
}
|
|
@@ -203,7 +203,7 @@ let McpResourcePickHelper = class McpResourcePickHelper extends Disposable {
|
|
|
203
203
|
return uri;
|
|
204
204
|
}
|
|
205
205
|
this._notificationService.warn(( localize(
|
|
206
|
-
|
|
206
|
+
8890,
|
|
207
207
|
"The resource {0} was not found.",
|
|
208
208
|
(McpResourceURI.toServer(uri).resourceURL.toString())
|
|
209
209
|
)));
|
|
@@ -244,13 +244,13 @@ let McpResourcePickHelper = class McpResourcePickHelper extends Disposable {
|
|
|
244
244
|
}
|
|
245
245
|
}
|
|
246
246
|
let placeholder = ( localize(
|
|
247
|
-
|
|
247
|
+
8891,
|
|
248
248
|
"Value for ${0} in {1}",
|
|
249
249
|
variable.name.toUpperCase(),
|
|
250
250
|
rt.template.resolve(variablesWithPlaceholders).replaceAll('%24', '$')
|
|
251
251
|
));
|
|
252
252
|
if (variable.optional) {
|
|
253
|
-
placeholder += ' (' + ( localize(
|
|
253
|
+
placeholder += ' (' + ( localize(8892, "Optional")) + ')';
|
|
254
254
|
}
|
|
255
255
|
input.placeholder = placeholder;
|
|
256
256
|
input.value = '';
|
|
@@ -263,7 +263,7 @@ let McpResourcePickHelper = class McpResourcePickHelper extends Disposable {
|
|
|
263
263
|
items.unshift({ id: currentID, label: value });
|
|
264
264
|
}
|
|
265
265
|
else if (variable.optional) {
|
|
266
|
-
items.unshift({ id: currentID, label: ( localize(
|
|
266
|
+
items.unshift({ id: currentID, label: ( localize(8893, "<Empty>")) });
|
|
267
267
|
}
|
|
268
268
|
input.items = items;
|
|
269
269
|
};
|
|
@@ -430,7 +430,7 @@ let AbstractMcpResourceAccessPick = class AbstractMcpResourceAccessPick {
|
|
|
430
430
|
picker.keepScrollPosition = true;
|
|
431
431
|
const store = ( new DisposableStore());
|
|
432
432
|
const goBackId = '_goback_';
|
|
433
|
-
const attachButton = ( localize(
|
|
433
|
+
const attachButton = ( localize(8894, "Attach to chat"));
|
|
434
434
|
const helper = store.add(this._instantiationService.createInstance(McpResourcePickHelper));
|
|
435
435
|
if (this._scopeTo) {
|
|
436
436
|
helper.explicitServers = [this._scopeTo];
|
|
@@ -451,7 +451,7 @@ let AbstractMcpResourceAccessPick = class AbstractMcpResourceAccessPick {
|
|
|
451
451
|
if (helper.checkIfNestedResources()) {
|
|
452
452
|
const goBackItem = {
|
|
453
453
|
id: goBackId,
|
|
454
|
-
label: ( localize(
|
|
454
|
+
label: ( localize(8895, 'Go back ↩')),
|
|
455
455
|
alwaysShow: true
|
|
456
456
|
};
|
|
457
457
|
items.push(goBackItem);
|
|
@@ -519,7 +519,7 @@ let McpResourceQuickPick = class McpResourceQuickPick extends AbstractMcpResourc
|
|
|
519
519
|
async pick(token = CancellationToken.None) {
|
|
520
520
|
const store = ( new DisposableStore());
|
|
521
521
|
const qp = store.add(this._quickInputService.createQuickPick({ useSeparators: true }));
|
|
522
|
-
qp.placeholder = ( localize(
|
|
522
|
+
qp.placeholder = ( localize(8896, "Search for resources"));
|
|
523
523
|
store.add(this.applyToPick(qp, token));
|
|
524
524
|
store.add(qp.onDidHide(() => store.dispose()));
|
|
525
525
|
qp.show();
|