@codingame/monaco-vscode-mcp-service-override 23.2.2 → 24.1.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.
- package/index.js +19 -19
- package/package.json +2 -15
- package/vscode/src/vs/platform/mcp/common/allowedMcpServersService.d.ts +1 -1
- package/vscode/src/vs/platform/mcp/common/allowedMcpServersService.js +2 -2
- package/vscode/src/vs/platform/mcp/common/mcpGalleryService.d.ts +2 -2
- package/vscode/src/vs/platform/mcp/common/mcpGalleryService.js +4 -8
- package/vscode/src/vs/platform/mcp/common/mcpManagementIpc.d.ts +2 -2
- package/vscode/src/vs/platform/mcp/common/mcpManagementService.d.ts +2 -2
- package/vscode/src/vs/platform/mcp/common/mcpManagementService.js +3 -3
- package/vscode/src/vs/platform/mcp/common/mcpResourceScannerService.d.ts +2 -2
- package/vscode/src/vs/platform/mcp/common/mcpResourceScannerService.js +1 -1
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcp.contribution.js +8 -8
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpAddContextContribution.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpAddContextContribution.js +43 -27
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpCommands.js +70 -70
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpDiscovery.js +1 -1
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpElicitationService.d.ts +10 -4
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpElicitationService.js +198 -35
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpLanguageFeatures.js +21 -21
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpMigration.js +9 -9
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpResourceQuickAccess.d.ts +24 -5
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpResourceQuickAccess.js +178 -51
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerActions.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerActions.js +35 -35
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerEditor.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerEditor.js +37 -37
- 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.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerWidgets.js +7 -7
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServersView.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServersView.js +26 -26
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpWorkbenchService.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpWorkbenchService.js +12 -12
- package/vscode/src/vs/workbench/contrib/mcp/browser/openPanelChatAndGetWidget.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/mcp/browser/openPanelChatAndGetWidget.js +1 -1
- package/vscode/src/vs/workbench/contrib/mcp/common/discovery/extensionMcpDiscovery.js +5 -5
- package/vscode/src/vs/workbench/contrib/mcp/common/discovery/installedMcpServersDiscovery.js +1 -1
- package/vscode/src/vs/workbench/contrib/mcp/common/discovery/nativeMcpDiscoveryAbstract.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/mcp/common/discovery/nativeMcpDiscoveryAbstract.js +2 -2
- package/vscode/src/vs/workbench/contrib/mcp/common/discovery/nativeMcpDiscoveryAdapters.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/mcp/common/discovery/nativeMcpDiscoveryAdapters.js +1 -1
- package/vscode/src/vs/workbench/contrib/mcp/common/discovery/nativeMcpRemoteDiscovery.js +1 -1
- package/vscode/src/vs/workbench/contrib/mcp/common/discovery/workspaceMcpDiscoveryAdapter.js +1 -1
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpContextKeys.js +4 -4
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpDevMode.js +4 -2
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpLanguageModelToolContribution.js +20 -14
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpRegistry.js +14 -14
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpResourceFilesystem.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpResourceFilesystem.js +19 -3
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpSamplingLog.js +2 -2
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpSamplingService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpSamplingService.js +21 -20
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpServer.d.ts +6 -2
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpServer.js +79 -47
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpServerConnection.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpServerConnection.js +8 -6
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpServerRequestHandler.d.ts +47 -2
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpServerRequestHandler.js +229 -14
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpService.js +2 -2
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpTaskManager.d.ts +68 -0
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpTaskManager.js +168 -0
- package/vscode/src/vs/workbench/services/authentication/browser/authenticationMcpService.js +10 -10
- package/vscode/src/vs/workbench/services/mcp/browser/mcpGalleryManifestService.d.ts +17 -2
- package/vscode/src/vs/workbench/services/mcp/browser/mcpGalleryManifestService.js +60 -10
- package/vscode/src/vs/workbench/services/mcp/common/mcpWorkbenchManagementService.d.ts +1 -1
- package/vscode/src/vs/workbench/services/mcp/common/mcpWorkbenchManagementService.js +2 -2
|
@@ -11,7 +11,7 @@ import { VSBuffer } from '@codingame/monaco-vscode-api/vscode/vs/base/common/buf
|
|
|
11
11
|
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
12
12
|
import { groupBy } from '@codingame/monaco-vscode-api/vscode/vs/base/common/collections';
|
|
13
13
|
import { Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
14
|
-
import {
|
|
14
|
+
import { createMarkdownCommandLink, MarkdownString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent';
|
|
15
15
|
import { DisposableStore, Disposable, toDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
16
16
|
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
17
17
|
import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
|
|
@@ -28,38 +28,38 @@ import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/pl
|
|
|
28
28
|
import { ContextKeyExpr } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
|
|
29
29
|
import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service';
|
|
30
30
|
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
31
|
-
import { mcpAutoStartConfig, McpAutoStartValue } from '@codingame/monaco-vscode-
|
|
31
|
+
import { mcpAutoStartConfig, McpAutoStartValue } from '@codingame/monaco-vscode-api/vscode/vs/platform/mcp/common/mcpManagement';
|
|
32
32
|
import { observableConfigValue } from '@codingame/monaco-vscode-api/vscode/vs/platform/observable/common/platformObservableUtils';
|
|
33
33
|
import { IQuickInputService } from '@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickInput.service';
|
|
34
34
|
import { defaultCheckboxStyles } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/browser/defaultStyles';
|
|
35
35
|
import { spinningLoading } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/iconRegistry';
|
|
36
36
|
import { IWorkspaceContextService } from '@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service';
|
|
37
|
-
import { PICK_WORKSPACE_FOLDER_COMMAND_ID } from '@codingame/monaco-vscode-
|
|
37
|
+
import { PICK_WORKSPACE_FOLDER_COMMAND_ID } from '@codingame/monaco-vscode-api/vscode/vs/workbench/browser/actions/workspaceCommands';
|
|
38
38
|
import { ResourceContextKey, ActiveEditorContext, RemoteNameContext, WorkspaceFolderCountContext, WorkbenchStateContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/contextkeys';
|
|
39
39
|
import { IAuthenticationService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/authentication/common/authentication.service';
|
|
40
40
|
import { IAuthenticationQueryService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/authentication/common/authenticationQuery.service';
|
|
41
|
-
import { WORKSPACE_STANDALONE_CONFIGURATIONS, MCP_CONFIGURATION_KEY } from '@codingame/monaco-vscode-
|
|
41
|
+
import { WORKSPACE_STANDALONE_CONFIGURATIONS, MCP_CONFIGURATION_KEY } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/configuration/common/configuration';
|
|
42
42
|
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
43
43
|
import { IRemoteUserDataProfilesService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/userDataProfile/common/remoteUserDataProfiles.service';
|
|
44
44
|
import { IUserDataProfileService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/userDataProfile/common/userDataProfile.service';
|
|
45
45
|
import { IViewsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/views/common/viewsService.service';
|
|
46
|
-
import { CHAT_CONFIG_MENU_ID } from '@codingame/monaco-vscode-
|
|
47
|
-
import { ChatViewId } from '@codingame/monaco-vscode-
|
|
46
|
+
import { CHAT_CONFIG_MENU_ID } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
|
|
47
|
+
import { ChatViewId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat';
|
|
48
48
|
import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
|
|
49
49
|
import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
|
|
50
50
|
import { ChatModeKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
51
51
|
import { ILanguageModelsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels.service';
|
|
52
52
|
import { ILanguageModelToolsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModelToolsService.service';
|
|
53
|
-
import { VIEW_CONTAINER } from '@codingame/monaco-vscode-
|
|
53
|
+
import { VIEW_CONTAINER } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/extensions/browser/extensions.contribution';
|
|
54
54
|
import { extensionsFilterSubMenu } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/extensions/common/extensions';
|
|
55
55
|
import { IExtensionsWorkbenchService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/extensions/common/extensions.service';
|
|
56
|
-
import { TEXT_FILE_EDITOR_ID } from '@codingame/monaco-vscode-
|
|
57
|
-
import { McpCommandIds } from '@codingame/monaco-vscode-
|
|
56
|
+
import { TEXT_FILE_EDITOR_ID } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/files/common/files';
|
|
57
|
+
import { McpCommandIds } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpCommandIds';
|
|
58
58
|
import { McpContextKeys } from '../common/mcpContextKeys.js';
|
|
59
59
|
import { IMcpRegistry } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpRegistryTypes.service';
|
|
60
60
|
import { McpConnectionState, McpCapability, McpServerCacheState, LazyCollectionState, McpStartServerInteraction, InstalledMcpServersViewId, HasInstalledMcpServersContext, mcpPromptPrefix } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpTypes';
|
|
61
61
|
import { IMcpService, IMcpSamplingService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpTypes.service';
|
|
62
|
-
import { McpAddConfigurationCommand } from '@codingame/monaco-vscode-
|
|
62
|
+
import { McpAddConfigurationCommand } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/browser/mcpCommandsAddConfiguration';
|
|
63
63
|
import { McpResourceQuickPick, McpResourceQuickAccess } from './mcpResourceQuickAccess.js';
|
|
64
64
|
import * as mcpServerAction from './media/mcpServerAction.css';
|
|
65
65
|
import { openPanelChatAndGetWidget } from './openPanelChatAndGetWidget.js';
|
|
@@ -77,7 +77,7 @@ class ListMcpServerCommand extends Action2 {
|
|
|
77
77
|
constructor() {
|
|
78
78
|
super({
|
|
79
79
|
id: McpCommandIds.ListServer,
|
|
80
|
-
title: ( localize2(
|
|
80
|
+
title: ( localize2(8697, 'List Servers')),
|
|
81
81
|
icon: Codicon.server,
|
|
82
82
|
category,
|
|
83
83
|
f1: true,
|
|
@@ -96,14 +96,14 @@ class ListMcpServerCommand extends Action2 {
|
|
|
96
96
|
const quickInput = accessor.get(IQuickInputService);
|
|
97
97
|
const store = ( new DisposableStore());
|
|
98
98
|
const pick = quickInput.createQuickPick({ useSeparators: true });
|
|
99
|
-
pick.placeholder = ( localize(
|
|
99
|
+
pick.placeholder = ( localize(8698, 'Select an MCP Server'));
|
|
100
100
|
mcpService.activateCollections();
|
|
101
101
|
store.add(pick);
|
|
102
102
|
store.add(autorun(reader => {
|
|
103
103
|
const servers = groupBy(mcpService.servers.read(reader).slice().sort((a, b) => (a.collection.presentation?.order || 0) - (b.collection.presentation?.order || 0)), s => s.collection.id);
|
|
104
104
|
const firstRun = pick.items.length === 0;
|
|
105
105
|
pick.items = [
|
|
106
|
-
{ id: '$add', label: ( localize(
|
|
106
|
+
{ id: '$add', label: ( localize(8699, 'Add Server')), description: ( localize(8700, 'Add a new server configuration')), alwaysShow: true, iconClass: ThemeIcon.asClassName(Codicon.add) },
|
|
107
107
|
...( Object.values(servers)).filter(s => s.length).flatMap((servers) => [
|
|
108
108
|
{ type: 'separator', label: servers[0].collection.label, id: servers[0].collection.id },
|
|
109
109
|
...( servers.map(server => ({
|
|
@@ -140,7 +140,7 @@ class McpConfirmationServerOptionsCommand extends Action2 {
|
|
|
140
140
|
constructor() {
|
|
141
141
|
super({
|
|
142
142
|
id: McpCommandIds.ServerOptionsInConfirmation,
|
|
143
|
-
title: ( localize2(
|
|
143
|
+
title: ( localize2(8701, 'Server Options')),
|
|
144
144
|
category,
|
|
145
145
|
icon: Codicon.settingsGear,
|
|
146
146
|
f1: false,
|
|
@@ -159,7 +159,7 @@ class McpConfirmationServerOptionsCommand extends Action2 {
|
|
|
159
159
|
accessor.get(ICommandService).executeCommand(McpCommandIds.ServerOptions, tool.source.definitionId);
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
|
-
else if (arg.kind === '
|
|
162
|
+
else if (arg.kind === 'elicitation2') {
|
|
163
163
|
if (arg.source?.type === 'mcp') {
|
|
164
164
|
accessor.get(ICommandService).executeCommand(McpCommandIds.ServerOptions, arg.source.definitionId);
|
|
165
165
|
}
|
|
@@ -173,7 +173,7 @@ class McpServerOptionsCommand extends Action2 {
|
|
|
173
173
|
constructor() {
|
|
174
174
|
super({
|
|
175
175
|
id: McpCommandIds.ServerOptions,
|
|
176
|
-
title: ( localize2(
|
|
176
|
+
title: ( localize2(8701, 'Server Options')),
|
|
177
177
|
category,
|
|
178
178
|
f1: false,
|
|
179
179
|
});
|
|
@@ -195,20 +195,20 @@ class McpServerOptionsCommand extends Action2 {
|
|
|
195
195
|
const serverDefinition = collection?.serverDefinitions.get().find(s => s.id === server.definition.id);
|
|
196
196
|
const items = [];
|
|
197
197
|
const serverState = server.connectionState.get();
|
|
198
|
-
items.push({ type: 'separator', label: ( localize(
|
|
198
|
+
items.push({ type: 'separator', label: ( localize(8702, 'Status')) });
|
|
199
199
|
if (McpConnectionState.canBeStarted(serverState.state)) {
|
|
200
200
|
items.push({
|
|
201
|
-
label: ( localize(
|
|
201
|
+
label: ( localize(8703, 'Start Server')),
|
|
202
202
|
action: 'start'
|
|
203
203
|
});
|
|
204
204
|
}
|
|
205
205
|
else {
|
|
206
206
|
items.push({
|
|
207
|
-
label: ( localize(
|
|
207
|
+
label: ( localize(8704, 'Stop Server')),
|
|
208
208
|
action: 'stop'
|
|
209
209
|
});
|
|
210
210
|
items.push({
|
|
211
|
-
label: ( localize(
|
|
211
|
+
label: ( localize(8705, 'Restart Server')),
|
|
212
212
|
action: 'restart'
|
|
213
213
|
});
|
|
214
214
|
}
|
|
@@ -216,36 +216,36 @@ class McpServerOptionsCommand extends Action2 {
|
|
|
216
216
|
const configTarget = serverDefinition?.presentation?.origin || collection?.presentation?.origin;
|
|
217
217
|
if (configTarget) {
|
|
218
218
|
items.push({
|
|
219
|
-
label: ( localize(
|
|
219
|
+
label: ( localize(8706, 'Show Configuration')),
|
|
220
220
|
action: 'config',
|
|
221
221
|
});
|
|
222
222
|
}
|
|
223
223
|
items.push({
|
|
224
|
-
label: ( localize(
|
|
224
|
+
label: ( localize(8707, 'Show Output')),
|
|
225
225
|
action: 'showOutput'
|
|
226
226
|
});
|
|
227
|
-
items.push({ type: 'separator', label: ( localize(
|
|
228
|
-
label: ( localize(
|
|
229
|
-
description: ( localize(
|
|
227
|
+
items.push({ type: 'separator', label: ( localize(8708, 'Sampling')) }, {
|
|
228
|
+
label: ( localize(8709, 'Configure Model Access')),
|
|
229
|
+
description: ( localize(8710, 'Set the models the server can use via MCP sampling')),
|
|
230
230
|
action: 'configSampling'
|
|
231
231
|
});
|
|
232
232
|
if (samplingService.hasLogs(server)) {
|
|
233
233
|
items.push({
|
|
234
|
-
label: ( localize(
|
|
235
|
-
description: ( localize(
|
|
234
|
+
label: ( localize(8711, 'Show Sampling Requests')),
|
|
235
|
+
description: ( localize(8712, 'Show the sampling requests for this server')),
|
|
236
236
|
action: 'samplingLog',
|
|
237
237
|
});
|
|
238
238
|
}
|
|
239
239
|
const capabilities = server.capabilities.get();
|
|
240
240
|
if (capabilities === undefined || (capabilities & McpCapability.Resources)) {
|
|
241
|
-
items.push({ type: 'separator', label: ( localize(
|
|
241
|
+
items.push({ type: 'separator', label: ( localize(8713, 'Resources')) });
|
|
242
242
|
items.push({
|
|
243
|
-
label: ( localize(
|
|
243
|
+
label: ( localize(8714, 'Browse Resources')),
|
|
244
244
|
action: 'resources',
|
|
245
245
|
});
|
|
246
246
|
}
|
|
247
247
|
const pick = await quickInputService.pick(items, {
|
|
248
|
-
placeHolder: ( localize(
|
|
248
|
+
placeHolder: ( localize(8715, 'Select action for \'{0}\'', server.definition.label)),
|
|
249
249
|
});
|
|
250
250
|
if (!pick) {
|
|
251
251
|
return;
|
|
@@ -287,7 +287,7 @@ class McpServerOptionsCommand extends Action2 {
|
|
|
287
287
|
editorService.openEditor({
|
|
288
288
|
resource: undefined,
|
|
289
289
|
contents: samplingService.getLogText(server),
|
|
290
|
-
label: ( localize(
|
|
290
|
+
label: ( localize(8716, 'MCP Sampling: {0}', server.definition.label)),
|
|
291
291
|
});
|
|
292
292
|
break;
|
|
293
293
|
default:
|
|
@@ -304,7 +304,7 @@ class McpServerOptionsCommand extends Action2 {
|
|
|
304
304
|
if (accountQuery.entities().getEntityCount().total > 1) {
|
|
305
305
|
result.push({
|
|
306
306
|
action: 'disconnect',
|
|
307
|
-
label: ( localize(
|
|
307
|
+
label: ( localize(8717, 'Disconnect Account')),
|
|
308
308
|
description: `(${accountName})`,
|
|
309
309
|
accountQuery
|
|
310
310
|
});
|
|
@@ -312,7 +312,7 @@ class McpServerOptionsCommand extends Action2 {
|
|
|
312
312
|
else {
|
|
313
313
|
result.push({
|
|
314
314
|
action: 'signout',
|
|
315
|
-
label: ( localize(
|
|
315
|
+
label: ( localize(8718, 'Sign Out')),
|
|
316
316
|
description: `(${accountName})`,
|
|
317
317
|
accountQuery
|
|
318
318
|
});
|
|
@@ -455,7 +455,7 @@ let MCPServerActionRendering = class MCPServerActionRendering extends Disposable
|
|
|
455
455
|
return this.getLabelForState() || super.getTooltip();
|
|
456
456
|
}
|
|
457
457
|
getHoverContents({ state, servers } = displayedStateCurrent.get()) {
|
|
458
|
-
const link = (s) =>
|
|
458
|
+
const link = (s) => createMarkdownCommandLink({
|
|
459
459
|
title: s.definition.label,
|
|
460
460
|
id: McpCommandIds.ServerOptions,
|
|
461
461
|
arguments: [s.definition.id],
|
|
@@ -466,21 +466,21 @@ let MCPServerActionRendering = class MCPServerActionRendering extends Disposable
|
|
|
466
466
|
if (state === DisplayedState.NewTools) {
|
|
467
467
|
markdown = ( new MarkdownString(single
|
|
468
468
|
? ( localize(
|
|
469
|
-
|
|
469
|
+
8719,
|
|
470
470
|
"MCP server {0} has been updated and may have new tools available.",
|
|
471
471
|
names
|
|
472
472
|
))
|
|
473
473
|
: ( localize(
|
|
474
|
-
|
|
474
|
+
8720,
|
|
475
475
|
"MCP servers have been updated and may have new tools available:\n\n{0}",
|
|
476
476
|
names
|
|
477
477
|
))));
|
|
478
478
|
}
|
|
479
479
|
else if (state === DisplayedState.Error) {
|
|
480
480
|
markdown = ( new MarkdownString(single
|
|
481
|
-
? ( localize(
|
|
481
|
+
? ( localize(8721, "MCP server {0} was unable to start successfully.", names))
|
|
482
482
|
: ( localize(
|
|
483
|
-
|
|
483
|
+
8722,
|
|
484
484
|
"Multiple MCP servers were unable to start successfully:\n\n{0}",
|
|
485
485
|
names
|
|
486
486
|
))));
|
|
@@ -508,7 +508,7 @@ let MCPServerActionRendering = class MCPServerActionRendering extends Disposable
|
|
|
508
508
|
const divider = $('hr.mcp-hover-divider');
|
|
509
509
|
container.appendChild(divider);
|
|
510
510
|
const checkboxContainer = $('div.mcp-hover-setting');
|
|
511
|
-
const settingLabelStr = ( localize(
|
|
511
|
+
const settingLabelStr = ( localize(8723, "Automatically start MCP servers when sending a chat message"));
|
|
512
512
|
const checkbox = store.add(( new Checkbox(
|
|
513
513
|
settingLabelStr,
|
|
514
514
|
config.get() !== McpAutoStartValue.Never,
|
|
@@ -533,13 +533,13 @@ let MCPServerActionRendering = class MCPServerActionRendering extends Disposable
|
|
|
533
533
|
}
|
|
534
534
|
getLabelForState({ state, servers } = displayedStateCurrent.get()) {
|
|
535
535
|
if (state === DisplayedState.NewTools) {
|
|
536
|
-
return localize(
|
|
536
|
+
return localize(8724, "New tools available ({0})", servers.length || 1);
|
|
537
537
|
}
|
|
538
538
|
else if (state === DisplayedState.Error) {
|
|
539
|
-
return localize(
|
|
539
|
+
return localize(8725, "Error loading {0} tool(s)", servers.length || 1);
|
|
540
540
|
}
|
|
541
541
|
else if (state === DisplayedState.Refreshing) {
|
|
542
|
-
return localize(
|
|
542
|
+
return localize(8726, "Discovering tools...");
|
|
543
543
|
}
|
|
544
544
|
else {
|
|
545
545
|
return null;
|
|
@@ -560,10 +560,10 @@ class ResetMcpTrustCommand extends Action2 {
|
|
|
560
560
|
constructor() {
|
|
561
561
|
super({
|
|
562
562
|
id: McpCommandIds.ResetTrust,
|
|
563
|
-
title: ( localize2(
|
|
563
|
+
title: ( localize2(8727, "Reset Trust")),
|
|
564
564
|
category,
|
|
565
565
|
f1: true,
|
|
566
|
-
precondition: McpContextKeys.toolsCount.greater(0),
|
|
566
|
+
precondition: ( ContextKeyExpr.and(McpContextKeys.toolsCount.greater(0), ( ChatContextKeys.Setup.hidden.negate()))),
|
|
567
567
|
});
|
|
568
568
|
}
|
|
569
569
|
run(accessor) {
|
|
@@ -575,7 +575,7 @@ class ResetMcpCachedTools extends Action2 {
|
|
|
575
575
|
constructor() {
|
|
576
576
|
super({
|
|
577
577
|
id: McpCommandIds.ResetCachedTools,
|
|
578
|
-
title: ( localize2(
|
|
578
|
+
title: ( localize2(8728, "Reset Cached Tools")),
|
|
579
579
|
category,
|
|
580
580
|
f1: true,
|
|
581
581
|
precondition: ( ContextKeyExpr.and(McpContextKeys.toolsCount.greater(0), ( ChatContextKeys.Setup.hidden.negate()))),
|
|
@@ -590,9 +590,9 @@ class AddConfigurationAction extends Action2 {
|
|
|
590
590
|
constructor() {
|
|
591
591
|
super({
|
|
592
592
|
id: McpCommandIds.AddConfiguration,
|
|
593
|
-
title: ( localize2(
|
|
593
|
+
title: ( localize2(8729, "Add Server...")),
|
|
594
594
|
metadata: {
|
|
595
|
-
description: ( localize2(
|
|
595
|
+
description: ( localize2(8730, "Installs a new Model Context protocol to the mcp.json settings")),
|
|
596
596
|
},
|
|
597
597
|
category,
|
|
598
598
|
f1: true,
|
|
@@ -614,7 +614,7 @@ class RemoveStoredInput extends Action2 {
|
|
|
614
614
|
constructor() {
|
|
615
615
|
super({
|
|
616
616
|
id: McpCommandIds.RemoveStoredInput,
|
|
617
|
-
title: ( localize2(
|
|
617
|
+
title: ( localize2(8728, "Reset Cached Tools")),
|
|
618
618
|
category,
|
|
619
619
|
f1: false,
|
|
620
620
|
});
|
|
@@ -627,7 +627,7 @@ class EditStoredInput extends Action2 {
|
|
|
627
627
|
constructor() {
|
|
628
628
|
super({
|
|
629
629
|
id: McpCommandIds.EditStoredInput,
|
|
630
|
-
title: ( localize2(
|
|
630
|
+
title: ( localize2(8731, "Edit Stored Input")),
|
|
631
631
|
category,
|
|
632
632
|
f1: false,
|
|
633
633
|
});
|
|
@@ -641,7 +641,7 @@ class ShowConfiguration extends Action2 {
|
|
|
641
641
|
constructor() {
|
|
642
642
|
super({
|
|
643
643
|
id: McpCommandIds.ShowConfiguration,
|
|
644
|
-
title: ( localize2(
|
|
644
|
+
title: ( localize2(8732, "Show Configuration")),
|
|
645
645
|
category,
|
|
646
646
|
f1: false,
|
|
647
647
|
});
|
|
@@ -670,7 +670,7 @@ class ShowOutput extends Action2 {
|
|
|
670
670
|
constructor() {
|
|
671
671
|
super({
|
|
672
672
|
id: McpCommandIds.ShowOutput,
|
|
673
|
-
title: ( localize2(
|
|
673
|
+
title: ( localize2(8733, "Show Output")),
|
|
674
674
|
category,
|
|
675
675
|
f1: false,
|
|
676
676
|
});
|
|
@@ -683,7 +683,7 @@ class RestartServer extends Action2 {
|
|
|
683
683
|
constructor() {
|
|
684
684
|
super({
|
|
685
685
|
id: McpCommandIds.RestartServer,
|
|
686
|
-
title: ( localize2(
|
|
686
|
+
title: ( localize2(8734, "Restart Server")),
|
|
687
687
|
category,
|
|
688
688
|
f1: false,
|
|
689
689
|
});
|
|
@@ -699,7 +699,7 @@ class StartServer extends Action2 {
|
|
|
699
699
|
constructor() {
|
|
700
700
|
super({
|
|
701
701
|
id: McpCommandIds.StartServer,
|
|
702
|
-
title: ( localize2(
|
|
702
|
+
title: ( localize2(8735, "Start Server")),
|
|
703
703
|
category,
|
|
704
704
|
f1: false,
|
|
705
705
|
});
|
|
@@ -713,7 +713,7 @@ class StopServer extends Action2 {
|
|
|
713
713
|
constructor() {
|
|
714
714
|
super({
|
|
715
715
|
id: McpCommandIds.StopServer,
|
|
716
|
-
title: ( localize2(
|
|
716
|
+
title: ( localize2(8736, "Stop Server")),
|
|
717
717
|
category,
|
|
718
718
|
f1: false,
|
|
719
719
|
});
|
|
@@ -727,8 +727,8 @@ class McpBrowseCommand extends Action2 {
|
|
|
727
727
|
constructor() {
|
|
728
728
|
super({
|
|
729
729
|
id: McpCommandIds.Browse,
|
|
730
|
-
title: ( localize2(
|
|
731
|
-
tooltip: ( localize2(
|
|
730
|
+
title: ( localize2(8737, "MCP Servers")),
|
|
731
|
+
tooltip: ( localize2(8738, "Browse MCP Servers")),
|
|
732
732
|
category,
|
|
733
733
|
icon: Codicon.search,
|
|
734
734
|
precondition: ( ChatContextKeys.Setup.hidden.negate()),
|
|
@@ -751,7 +751,7 @@ class McpBrowseCommand extends Action2 {
|
|
|
751
751
|
MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
|
|
752
752
|
command: {
|
|
753
753
|
id: McpCommandIds.Browse,
|
|
754
|
-
title: ( localize2(
|
|
754
|
+
title: ( localize2(8739, "Browse MCP Servers")),
|
|
755
755
|
category,
|
|
756
756
|
precondition: ( ChatContextKeys.Setup.hidden.negate()),
|
|
757
757
|
},
|
|
@@ -760,9 +760,9 @@ class ShowInstalledMcpServersCommand extends Action2 {
|
|
|
760
760
|
constructor() {
|
|
761
761
|
super({
|
|
762
762
|
id: McpCommandIds.ShowInstalled,
|
|
763
|
-
title: ( localize2(
|
|
763
|
+
title: ( localize2(8740, "Show Installed Servers")),
|
|
764
764
|
category,
|
|
765
|
-
precondition: HasInstalledMcpServersContext,
|
|
765
|
+
precondition: ( ContextKeyExpr.and(HasInstalledMcpServersContext, ( ChatContextKeys.Setup.hidden.negate()))),
|
|
766
766
|
f1: true,
|
|
767
767
|
});
|
|
768
768
|
}
|
|
@@ -778,7 +778,7 @@ class ShowInstalledMcpServersCommand extends Action2 {
|
|
|
778
778
|
MenuRegistry.appendMenuItem(CHAT_CONFIG_MENU_ID, {
|
|
779
779
|
command: {
|
|
780
780
|
id: McpCommandIds.ShowInstalled,
|
|
781
|
-
title: ( localize2(
|
|
781
|
+
title: ( localize2(8741, "MCP Servers"))
|
|
782
782
|
},
|
|
783
783
|
when: ( ContextKeyExpr.and(ChatContextKeys.enabled, ( ContextKeyExpr.equals('view', ChatViewId)))),
|
|
784
784
|
order: 10,
|
|
@@ -799,7 +799,7 @@ class OpenUserMcpResourceCommand extends OpenMcpResourceCommand {
|
|
|
799
799
|
constructor() {
|
|
800
800
|
super({
|
|
801
801
|
id: McpCommandIds.OpenUserMcp,
|
|
802
|
-
title: ( localize2(
|
|
802
|
+
title: ( localize2(8742, "Open User Configuration")),
|
|
803
803
|
category,
|
|
804
804
|
f1: true,
|
|
805
805
|
precondition: ( ChatContextKeys.Setup.hidden.negate()),
|
|
@@ -814,7 +814,7 @@ class OpenRemoteUserMcpResourceCommand extends OpenMcpResourceCommand {
|
|
|
814
814
|
constructor() {
|
|
815
815
|
super({
|
|
816
816
|
id: McpCommandIds.OpenRemoteUserMcp,
|
|
817
|
-
title: ( localize2(
|
|
817
|
+
title: ( localize2(8743, "Open Remote User Configuration")),
|
|
818
818
|
category,
|
|
819
819
|
f1: true,
|
|
820
820
|
precondition: ( ContextKeyExpr.and(( ChatContextKeys.Setup.hidden.negate()), ( RemoteNameContext.notEqualsTo(''))))
|
|
@@ -831,7 +831,7 @@ class OpenWorkspaceFolderMcpResourceCommand extends Action2 {
|
|
|
831
831
|
constructor() {
|
|
832
832
|
super({
|
|
833
833
|
id: McpCommandIds.OpenWorkspaceFolderMcp,
|
|
834
|
-
title: ( localize2(
|
|
834
|
+
title: ( localize2(8744, "Open Workspace Folder MCP Configuration")),
|
|
835
835
|
category,
|
|
836
836
|
f1: true,
|
|
837
837
|
precondition: ( ContextKeyExpr.and(( ChatContextKeys.Setup.hidden.negate()), ( WorkspaceFolderCountContext.notEqualsTo(0))))
|
|
@@ -852,7 +852,7 @@ class OpenWorkspaceMcpResourceCommand extends Action2 {
|
|
|
852
852
|
constructor() {
|
|
853
853
|
super({
|
|
854
854
|
id: McpCommandIds.OpenWorkspaceMcp,
|
|
855
|
-
title: ( localize2(
|
|
855
|
+
title: ( localize2(8745, "Open Workspace MCP Configuration")),
|
|
856
856
|
category,
|
|
857
857
|
f1: true,
|
|
858
858
|
precondition: ( ContextKeyExpr.and(( ChatContextKeys.Setup.hidden.negate()), ( WorkbenchStateContext.isEqualTo('workspace'))))
|
|
@@ -871,9 +871,9 @@ class McpBrowseResourcesCommand extends Action2 {
|
|
|
871
871
|
constructor() {
|
|
872
872
|
super({
|
|
873
873
|
id: McpCommandIds.BrowseResources,
|
|
874
|
-
title: ( localize2(
|
|
874
|
+
title: ( localize2(8746, "Browse Resources...")),
|
|
875
875
|
category,
|
|
876
|
-
precondition: McpContextKeys.serverCount.greater(0),
|
|
876
|
+
precondition: ( ContextKeyExpr.and(McpContextKeys.serverCount.greater(0), ( ChatContextKeys.Setup.hidden.negate()))),
|
|
877
877
|
f1: true,
|
|
878
878
|
});
|
|
879
879
|
}
|
|
@@ -890,7 +890,7 @@ class McpConfigureSamplingModels extends Action2 {
|
|
|
890
890
|
constructor() {
|
|
891
891
|
super({
|
|
892
892
|
id: McpCommandIds.ConfigureSamplingModels,
|
|
893
|
-
title: ( localize2(
|
|
893
|
+
title: ( localize2(8747, "Configure SamplingModel")),
|
|
894
894
|
category,
|
|
895
895
|
});
|
|
896
896
|
}
|
|
@@ -914,7 +914,7 @@ class McpConfigureSamplingModels extends Action2 {
|
|
|
914
914
|
allItems.sort((a, b) => (b.picked ? 1 : 0) - (a.picked ? 1 : 0) || a.label.localeCompare(b.label));
|
|
915
915
|
const picked = await quickInputService.pick(allItems, {
|
|
916
916
|
placeHolder: ( localize(
|
|
917
|
-
|
|
917
|
+
8748,
|
|
918
918
|
'Pick the models {0} can access via MCP sampling',
|
|
919
919
|
server.definition.label
|
|
920
920
|
)),
|
|
@@ -930,7 +930,7 @@ class McpStartPromptingServerCommand extends Action2 {
|
|
|
930
930
|
constructor() {
|
|
931
931
|
super({
|
|
932
932
|
id: McpCommandIds.StartPromptForServer,
|
|
933
|
-
title: ( localize2(
|
|
933
|
+
title: ( localize2(8749, "Start Prompting Server")),
|
|
934
934
|
category,
|
|
935
935
|
f1: false,
|
|
936
936
|
});
|
|
@@ -957,7 +957,7 @@ class McpSkipCurrentAutostartCommand extends Action2 {
|
|
|
957
957
|
constructor() {
|
|
958
958
|
super({
|
|
959
959
|
id: McpCommandIds.SkipCurrentAutostart,
|
|
960
|
-
title: ( localize2(
|
|
960
|
+
title: ( localize2(8750, "Skip Current Autostart")),
|
|
961
961
|
category,
|
|
962
962
|
f1: false,
|
|
963
963
|
});
|
|
@@ -4,7 +4,7 @@ import { Disposable, DisposableStore } from '@codingame/monaco-vscode-api/vscode
|
|
|
4
4
|
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
5
5
|
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
6
6
|
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
7
|
-
import { mcpAccessConfig, McpAccessValue } from '@codingame/monaco-vscode-
|
|
7
|
+
import { mcpAccessConfig, McpAccessValue } from '@codingame/monaco-vscode-api/vscode/vs/platform/mcp/common/mcpManagement';
|
|
8
8
|
import { observableConfigValue } from '@codingame/monaco-vscode-api/vscode/vs/platform/observable/common/platformObservableUtils';
|
|
9
9
|
import { mcpDiscoveryRegistry } from '../common/discovery/mcpDiscovery.js';
|
|
10
10
|
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
@@ -1,20 +1,26 @@
|
|
|
1
1
|
import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation";
|
|
2
2
|
import { INotificationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/notification.service";
|
|
3
|
+
import { IOpenerService } from "@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service";
|
|
3
4
|
import { IQuickInputService } from "@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickInput.service";
|
|
4
5
|
import { IChatService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService.service";
|
|
5
|
-
import { IMcpServer, IMcpToolCallContext } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpTypes";
|
|
6
|
+
import { ElicitResult, IMcpServer, IMcpToolCallContext } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpTypes";
|
|
6
7
|
import { IMcpElicitationService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpTypes.service";
|
|
7
8
|
import { MCP } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/modelContextProtocol";
|
|
8
9
|
export declare class McpElicitationService implements IMcpElicitationService {
|
|
9
10
|
private readonly _notificationService;
|
|
10
11
|
private readonly _quickInputService;
|
|
11
12
|
private readonly _chatService;
|
|
13
|
+
private readonly _openerService;
|
|
12
14
|
readonly _serviceBrand: undefined;
|
|
13
|
-
constructor(_notificationService: INotificationService, _quickInputService: IQuickInputService, _chatService: IChatService);
|
|
14
|
-
elicit(server: IMcpServer, context: IMcpToolCallContext | undefined, elicitation: MCP.ElicitRequest["params"], token: CancellationToken): Promise<
|
|
15
|
-
private
|
|
15
|
+
constructor(_notificationService: INotificationService, _quickInputService: IQuickInputService, _chatService: IChatService, _openerService: IOpenerService);
|
|
16
|
+
elicit(server: IMcpServer, context: IMcpToolCallContext | undefined, elicitation: MCP.ElicitRequest["params"], token: CancellationToken): Promise<ElicitResult>;
|
|
17
|
+
private _elicitForm;
|
|
18
|
+
private _elicitUrl;
|
|
19
|
+
private _doElicitUrl;
|
|
20
|
+
private _doElicitForm;
|
|
16
21
|
private _getFieldPlaceholder;
|
|
17
22
|
private _handleEnumField;
|
|
23
|
+
private _handleMultiEnumField;
|
|
18
24
|
private _handleInputField;
|
|
19
25
|
private _validateInput;
|
|
20
26
|
private _validateString;
|