@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
package/index.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
|
|
2
2
|
import '@codingame/monaco-vscode-api/vscode/vs/editor/standalone/browser/standaloneServices';
|
|
3
3
|
import { SyncDescriptor } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/descriptors';
|
|
4
|
-
import {
|
|
4
|
+
import { AllowedMcpServersService } from './vscode/src/vs/platform/mcp/common/allowedMcpServersService.js';
|
|
5
|
+
import { IMcpGalleryManifestService } from '@codingame/monaco-vscode-api/vscode/vs/platform/mcp/common/mcpGalleryManifest.service';
|
|
6
|
+
import { McpGalleryService } from './vscode/src/vs/platform/mcp/common/mcpGalleryService.js';
|
|
7
|
+
import { IAllowedMcpServersService, IMcpGalleryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/mcp/common/mcpManagement.service';
|
|
8
|
+
import { McpResourceScannerService } from './vscode/src/vs/platform/mcp/common/mcpResourceScannerService.js';
|
|
9
|
+
import { IMcpResourceScannerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/mcp/common/mcpResourceScannerService.service';
|
|
10
|
+
import './vscode/src/vs/workbench/contrib/mcp/browser/mcp.contribution.js';
|
|
11
|
+
import { McpElicitationService } from './vscode/src/vs/workbench/contrib/mcp/browser/mcpElicitationService.js';
|
|
12
|
+
import { McpWorkbenchService } from './vscode/src/vs/workbench/contrib/mcp/browser/mcpWorkbenchService.js';
|
|
13
|
+
import { McpRegistry } from './vscode/src/vs/workbench/contrib/mcp/common/mcpRegistry.js';
|
|
5
14
|
import { IMcpRegistry } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpRegistryTypes.service';
|
|
15
|
+
import { McpSamplingService } from './vscode/src/vs/workbench/contrib/mcp/common/mcpSamplingService.js';
|
|
6
16
|
import { McpService } from './vscode/src/vs/workbench/contrib/mcp/common/mcpService.js';
|
|
7
|
-
import {
|
|
8
|
-
import './vscode/src/vs/workbench/contrib/mcp/browser/mcp.contribution.js';
|
|
9
|
-
import { IAuthenticationMcpService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/authentication/browser/authenticationMcpService.service';
|
|
10
|
-
import { AuthenticationMcpService } from './vscode/src/vs/workbench/services/authentication/browser/authenticationMcpService.js';
|
|
11
|
-
import { IAuthenticationMcpAccessService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/authentication/browser/authenticationMcpAccessService.service';
|
|
17
|
+
import { IMcpElicitationService, IMcpSamplingService, IMcpWorkbenchService, IMcpService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpTypes.service';
|
|
12
18
|
import { AuthenticationMcpAccessService } from './vscode/src/vs/workbench/services/authentication/browser/authenticationMcpAccessService.js';
|
|
13
|
-
import {
|
|
19
|
+
import { IAuthenticationMcpAccessService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/authentication/browser/authenticationMcpAccessService.service';
|
|
20
|
+
import { AuthenticationMcpService } from './vscode/src/vs/workbench/services/authentication/browser/authenticationMcpService.js';
|
|
21
|
+
import { IAuthenticationMcpService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/authentication/browser/authenticationMcpService.service';
|
|
14
22
|
import { AuthenticationMcpUsageService } from './vscode/src/vs/workbench/services/authentication/browser/authenticationMcpUsageService.js';
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import { McpGalleryService } from './vscode/src/vs/platform/mcp/common/mcpGalleryService.js';
|
|
18
|
-
import { McpSamplingService } from './vscode/src/vs/workbench/contrib/mcp/common/mcpSamplingService.js';
|
|
19
|
-
import { IMcpResourceScannerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/mcp/common/mcpResourceScannerService.service';
|
|
20
|
-
import { McpResourceScannerService } from './vscode/src/vs/platform/mcp/common/mcpResourceScannerService.js';
|
|
21
|
-
import { McpElicitationService } from './vscode/src/vs/workbench/contrib/mcp/browser/mcpElicitationService.js';
|
|
22
|
-
import { IWorkbenchMcpManagementService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/mcp/common/mcpWorkbenchManagementService.service';
|
|
23
|
+
import { IAuthenticationMcpUsageService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/authentication/browser/authenticationMcpUsageService.service';
|
|
24
|
+
import { WorkbenchMcpGalleryManifestService } from './vscode/src/vs/workbench/services/mcp/browser/mcpGalleryManifestService.js';
|
|
23
25
|
import { WorkbenchMcpManagementService } from './vscode/src/vs/workbench/services/mcp/browser/mcpWorkbenchManagementService.js';
|
|
24
|
-
import {
|
|
25
|
-
import { IMcpGalleryManifestService } from '@codingame/monaco-vscode-api/vscode/vs/platform/mcp/common/mcpGalleryManifest.service';
|
|
26
|
-
import { WebMcpGalleryManifestService } from './vscode/src/vs/workbench/services/mcp/browser/mcpGalleryManifestService.js';
|
|
26
|
+
import { IWorkbenchMcpManagementService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/mcp/common/mcpWorkbenchManagementService.service';
|
|
27
27
|
|
|
28
28
|
function getServiceOverride() {
|
|
29
29
|
return {
|
|
@@ -39,7 +39,7 @@ function getServiceOverride() {
|
|
|
39
39
|
[IMcpElicitationService.toString()]: new SyncDescriptor(McpElicitationService, [], true),
|
|
40
40
|
[IWorkbenchMcpManagementService.toString()]: new SyncDescriptor(WorkbenchMcpManagementService, [], true),
|
|
41
41
|
[IAllowedMcpServersService.toString()]: new SyncDescriptor(AllowedMcpServersService, [], true),
|
|
42
|
-
[IMcpGalleryManifestService.toString()]: new SyncDescriptor(
|
|
42
|
+
[IMcpGalleryManifestService.toString()]: new SyncDescriptor(WorkbenchMcpGalleryManifestService, [], true)
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
45
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-mcp-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "24.1.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - mcp service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,20 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-
|
|
19
|
-
"@codingame/monaco-vscode-2339d6ac-d6bb-53cd-95ee-81911735d1c7-common": "23.2.2",
|
|
20
|
-
"@codingame/monaco-vscode-2673c6e2-17c1-5710-b169-46f3d4a28696-common": "23.2.2",
|
|
21
|
-
"@codingame/monaco-vscode-2eda793f-4b5b-58e8-83c5-1bfd3bad15f1-common": "23.2.2",
|
|
22
|
-
"@codingame/monaco-vscode-3b5a5cd1-d4ff-500a-b609-57e0cd4afa0a-common": "23.2.2",
|
|
23
|
-
"@codingame/monaco-vscode-4a3ac544-9a61-534c-88df-756262793ef7-common": "23.2.2",
|
|
24
|
-
"@codingame/monaco-vscode-501b06ab-3f58-516b-8a1a-c29d375d3da4-common": "23.2.2",
|
|
25
|
-
"@codingame/monaco-vscode-60014c9d-b815-501d-83a9-4b08725c2ec2-common": "23.2.2",
|
|
26
|
-
"@codingame/monaco-vscode-api": "23.2.2",
|
|
27
|
-
"@codingame/monaco-vscode-cc2a4237-8890-5664-9fcf-a56ecd22e3ef-common": "23.2.2",
|
|
28
|
-
"@codingame/monaco-vscode-ce7c734f-7712-563c-9335-d7acb43306af-common": "23.2.2",
|
|
29
|
-
"@codingame/monaco-vscode-cf77987b-b1b7-5359-aaf8-a259c63d9f03-common": "23.2.2",
|
|
30
|
-
"@codingame/monaco-vscode-dc3fa21d-a483-5b99-a7ab-173235644a34-common": "23.2.2",
|
|
31
|
-
"@codingame/monaco-vscode-f24e325c-2ce0-5bba-8236-bfc4f53180ab-common": "23.2.2"
|
|
18
|
+
"@codingame/monaco-vscode-api": "24.1.0"
|
|
32
19
|
},
|
|
33
20
|
"main": "index.js",
|
|
34
21
|
"module": "index.js",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
2
|
import { IMarkdownString } from "@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent";
|
|
3
3
|
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
4
|
-
import { IGalleryMcpServer, IInstallableMcpServer, ILocalMcpServer } from "@codingame/monaco-vscode-
|
|
4
|
+
import { IGalleryMcpServer, IInstallableMcpServer, ILocalMcpServer } from "@codingame/monaco-vscode-api/vscode/vs/platform/mcp/common/mcpManagement";
|
|
5
5
|
import { IAllowedMcpServersService } from "@codingame/monaco-vscode-api/vscode/vs/platform/mcp/common/mcpManagement.service";
|
|
6
6
|
export declare class AllowedMcpServersService extends Disposable implements IAllowedMcpServersService {
|
|
7
7
|
private readonly configurationService;
|
|
@@ -5,7 +5,7 @@ import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
|
5
5
|
import { createCommandUri, MarkdownString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent';
|
|
6
6
|
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
7
7
|
import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
8
|
-
import { mcpAccessConfig, McpAccessValue } from '@codingame/monaco-vscode-
|
|
8
|
+
import { mcpAccessConfig, McpAccessValue } from '@codingame/monaco-vscode-api/vscode/vs/platform/mcp/common/mcpManagement';
|
|
9
9
|
|
|
10
10
|
let AllowedMcpServersService = class AllowedMcpServersService extends Disposable {
|
|
11
11
|
constructor(configurationService) {
|
|
@@ -25,7 +25,7 @@ let AllowedMcpServersService = class AllowedMcpServersService extends Disposable
|
|
|
25
25
|
}
|
|
26
26
|
const settingsCommandLink = ( createCommandUri('workbench.action.openSettings', { query: `@id:${mcpAccessConfig}` }).toString());
|
|
27
27
|
return (new MarkdownString(localize(
|
|
28
|
-
|
|
28
|
+
1993,
|
|
29
29
|
"Model Context Protocol servers are disabled in the Editor. Please check your [settings]({0}).",
|
|
30
30
|
settingsCommandLink
|
|
31
31
|
)));
|
|
@@ -3,11 +3,11 @@ import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/l
|
|
|
3
3
|
import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service";
|
|
4
4
|
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
5
5
|
import { IRequestService } from "@codingame/monaco-vscode-api/vscode/vs/platform/request/common/request.service";
|
|
6
|
-
import { IGalleryMcpServer, IQueryOptions } from "@codingame/monaco-vscode-
|
|
6
|
+
import { IGalleryMcpServer, IQueryOptions } from "@codingame/monaco-vscode-api/vscode/vs/platform/mcp/common/mcpManagement";
|
|
7
7
|
import { IMcpGalleryService } from "@codingame/monaco-vscode-api/vscode/vs/platform/mcp/common/mcpManagement.service";
|
|
8
8
|
import { IMcpGalleryManifest } from "@codingame/monaco-vscode-api/vscode/vs/platform/mcp/common/mcpGalleryManifest";
|
|
9
9
|
import { IMcpGalleryManifestService } from "@codingame/monaco-vscode-api/vscode/vs/platform/mcp/common/mcpGalleryManifest.service";
|
|
10
|
-
import { IIterativePager } from "@codingame/monaco-vscode-
|
|
10
|
+
import { IIterativePager } from "@codingame/monaco-vscode-api/vscode/vs/base/common/paging";
|
|
11
11
|
export declare class McpGalleryService extends Disposable implements IMcpGalleryService {
|
|
12
12
|
private readonly requestService;
|
|
13
13
|
private readonly fileService;
|
|
@@ -11,7 +11,7 @@ import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/fi
|
|
|
11
11
|
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
12
12
|
import { asText, asJson } from '@codingame/monaco-vscode-api/vscode/vs/platform/request/common/request';
|
|
13
13
|
import { IRequestService } from '@codingame/monaco-vscode-api/vscode/vs/platform/request/common/request.service';
|
|
14
|
-
import { TransportType, RegistryType, GalleryMcpServerStatus } from '@codingame/monaco-vscode-
|
|
14
|
+
import { TransportType, RegistryType, GalleryMcpServerStatus } from '@codingame/monaco-vscode-api/vscode/vs/platform/mcp/common/mcpManagement';
|
|
15
15
|
import { McpGalleryManifestStatus, getMcpGalleryManifestResourceUri, McpGalleryResourceType } from '@codingame/monaco-vscode-api/vscode/vs/platform/mcp/common/mcpGalleryManifest';
|
|
16
16
|
import { IMcpGalleryManifestService } from '@codingame/monaco-vscode-api/vscode/vs/platform/mcp/common/mcpGalleryManifest.service';
|
|
17
17
|
import { CancellationError } from '@codingame/monaco-vscode-api/vscode/vs/base/common/errors';
|
|
@@ -215,7 +215,6 @@ var McpServerSchemaVersion_v2025_07_09;
|
|
|
215
215
|
var McpServerSchemaVersion_v0_1;
|
|
216
216
|
(function (McpServerSchemaVersion_v0_1) {
|
|
217
217
|
McpServerSchemaVersion_v0_1.VERSION = 'v0.1';
|
|
218
|
-
McpServerSchemaVersion_v0_1.SCHEMA = `https://static.modelcontextprotocol.io/schemas/2025-09-29/server.schema.json`;
|
|
219
218
|
class Serializer {
|
|
220
219
|
toRawGalleryMcpServerResult(input) {
|
|
221
220
|
if (!input || typeof input !== 'object' || !Array.isArray(input.servers)) {
|
|
@@ -251,9 +250,6 @@ var McpServerSchemaVersion_v0_1;
|
|
|
251
250
|
|| (!from.server.version || !isString(from.server.version))) {
|
|
252
251
|
return undefined;
|
|
253
252
|
}
|
|
254
|
-
if (from.server.$schema && from.server.$schema !== McpServerSchemaVersion_v0_1.SCHEMA) {
|
|
255
|
-
return undefined;
|
|
256
|
-
}
|
|
257
253
|
const { 'io.modelcontextprotocol.registry/official': registryInfo, ...apicInfo } = from._meta;
|
|
258
254
|
const githubInfo = from.server._meta?.['io.modelcontextprotocol.registry/publisher-provided']?.github;
|
|
259
255
|
return {
|
|
@@ -412,7 +408,7 @@ let McpGalleryService = class McpGalleryService extends Disposable {
|
|
|
412
408
|
async getReadme(gallery, token) {
|
|
413
409
|
const readmeUrl = gallery.readmeUrl;
|
|
414
410
|
if (!readmeUrl) {
|
|
415
|
-
return Promise.resolve(( localize(
|
|
411
|
+
return Promise.resolve(( localize(1994, 'No README available')));
|
|
416
412
|
}
|
|
417
413
|
const uri = ( URI.parse(readmeUrl));
|
|
418
414
|
if (uri.scheme === Schemas.file) {
|
|
@@ -425,7 +421,7 @@ let McpGalleryService = class McpGalleryService extends Disposable {
|
|
|
425
421
|
}
|
|
426
422
|
}
|
|
427
423
|
if (uri.authority !== 'raw.githubusercontent.com') {
|
|
428
|
-
return ( new MarkdownString(( localize(
|
|
424
|
+
return ( new MarkdownString(( localize(1995, "You can find information about this server [here]({0})", readmeUrl)))).value;
|
|
429
425
|
}
|
|
430
426
|
const context = await this.requestService.request({
|
|
431
427
|
type: 'GET',
|
|
@@ -541,7 +537,7 @@ let McpGalleryService = class McpGalleryService extends Disposable {
|
|
|
541
537
|
this.logService.error(`Failed to read file from ${uri}: ${error}`);
|
|
542
538
|
}
|
|
543
539
|
}
|
|
544
|
-
let url = `${mcpGalleryUrl}?limit=${query.pageSize}`;
|
|
540
|
+
let url = `${mcpGalleryUrl}?limit=${query.pageSize}&version=latest`;
|
|
545
541
|
if (query.cursor) {
|
|
546
542
|
url += `&cursor=${query.cursor}`;
|
|
547
543
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
|
|
2
2
|
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
3
3
|
import { IURITransformer } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uriIpc";
|
|
4
|
-
import { IChannel, IServerChannel } from "@codingame/monaco-vscode-
|
|
4
|
+
import { IChannel, IServerChannel } from "@codingame/monaco-vscode-api/vscode/vs/base/parts/ipc/common/ipc";
|
|
5
5
|
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
6
6
|
import { RemoteAgentConnectionContext } from "@codingame/monaco-vscode-api/vscode/vs/platform/remote/common/remoteAgentEnvironment";
|
|
7
|
-
import { DidUninstallMcpServerEvent, IGalleryMcpServer, ILocalMcpServer, IInstallableMcpServer, InstallMcpServerEvent, InstallMcpServerResult, InstallOptions, UninstallMcpServerEvent, UninstallOptions } from "@codingame/monaco-vscode-
|
|
7
|
+
import { DidUninstallMcpServerEvent, IGalleryMcpServer, ILocalMcpServer, IInstallableMcpServer, InstallMcpServerEvent, InstallMcpServerResult, InstallOptions, UninstallMcpServerEvent, UninstallOptions } from "@codingame/monaco-vscode-api/vscode/vs/platform/mcp/common/mcpManagement";
|
|
8
8
|
import { IAllowedMcpServersService } from "@codingame/monaco-vscode-api/vscode/vs/platform/mcp/common/mcpManagement.service";
|
|
9
9
|
import { IMcpManagementService } from "@codingame/monaco-vscode-api/vscode/vs/platform/mcp/common/mcpManagement.service";
|
|
10
10
|
import { AbstractMcpManagementService } from "./mcpManagementService.js";
|
|
@@ -8,11 +8,11 @@ import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/pl
|
|
|
8
8
|
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
9
9
|
import { IUriIdentityService } from "@codingame/monaco-vscode-api/vscode/vs/platform/uriIdentity/common/uriIdentity.service";
|
|
10
10
|
import { IUserDataProfilesService } from "@codingame/monaco-vscode-api/vscode/vs/platform/userDataProfile/common/userDataProfile.service";
|
|
11
|
-
import { DidUninstallMcpServerEvent, IGalleryMcpServer, ILocalMcpServer, IMcpServerInput, IGalleryMcpServerConfiguration, InstallMcpServerEvent, InstallMcpServerResult, RegistryType, UninstallMcpServerEvent, InstallOptions, UninstallOptions, IInstallableMcpServer, McpServerConfigurationParseResult } from "@codingame/monaco-vscode-
|
|
11
|
+
import { DidUninstallMcpServerEvent, IGalleryMcpServer, ILocalMcpServer, IMcpServerInput, IGalleryMcpServerConfiguration, InstallMcpServerEvent, InstallMcpServerResult, RegistryType, UninstallMcpServerEvent, InstallOptions, UninstallOptions, IInstallableMcpServer, McpServerConfigurationParseResult } from "@codingame/monaco-vscode-api/vscode/vs/platform/mcp/common/mcpManagement";
|
|
12
12
|
import { IAllowedMcpServersService } from "@codingame/monaco-vscode-api/vscode/vs/platform/mcp/common/mcpManagement.service";
|
|
13
13
|
import { IMcpManagementService } from "@codingame/monaco-vscode-api/vscode/vs/platform/mcp/common/mcpManagement.service";
|
|
14
14
|
import { IMcpGalleryService } from "@codingame/monaco-vscode-api/vscode/vs/platform/mcp/common/mcpManagement.service";
|
|
15
|
-
import { IMcpServerVariable, IMcpServerConfiguration } from "@codingame/monaco-vscode-
|
|
15
|
+
import { IMcpServerVariable, IMcpServerConfiguration } from "@codingame/monaco-vscode-api/vscode/vs/platform/mcp/common/mcpPlatformTypes";
|
|
16
16
|
import { McpResourceTarget } from "./mcpResourceScannerService.js";
|
|
17
17
|
import { IMcpResourceScannerService } from "@codingame/monaco-vscode-api/vscode/vs/platform/mcp/common/mcpResourceScannerService.service";
|
|
18
18
|
export interface ILocalMcpServerInfo {
|
|
@@ -18,9 +18,9 @@ import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/pl
|
|
|
18
18
|
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
19
19
|
import { IUriIdentityService } from '@codingame/monaco-vscode-api/vscode/vs/platform/uriIdentity/common/uriIdentity.service';
|
|
20
20
|
import { IUserDataProfilesService } from '@codingame/monaco-vscode-api/vscode/vs/platform/userDataProfile/common/userDataProfile.service';
|
|
21
|
-
import { RegistryType } from '@codingame/monaco-vscode-
|
|
21
|
+
import { RegistryType } from '@codingame/monaco-vscode-api/vscode/vs/platform/mcp/common/mcpManagement';
|
|
22
22
|
import { IMcpGalleryService, IAllowedMcpServersService } from '@codingame/monaco-vscode-api/vscode/vs/platform/mcp/common/mcpManagement.service';
|
|
23
|
-
import { McpServerType, McpServerVariableType } from '@codingame/monaco-vscode-
|
|
23
|
+
import { McpServerType, McpServerVariableType } from '@codingame/monaco-vscode-api/vscode/vs/platform/mcp/common/mcpPlatformTypes';
|
|
24
24
|
import { IMcpResourceScannerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/mcp/common/mcpResourceScannerService.service';
|
|
25
25
|
|
|
26
26
|
let AbstractCommonMcpManagementService = class AbstractCommonMcpManagementService extends Disposable {
|
|
@@ -501,7 +501,7 @@ let AbstractMcpManagementService = class AbstractMcpManagementService extends Ab
|
|
|
501
501
|
const allowedToInstall = this.allowedMcpServersService.isAllowed(server);
|
|
502
502
|
if (allowedToInstall !== true) {
|
|
503
503
|
return (new MarkdownString(localize(
|
|
504
|
-
|
|
504
|
+
1996,
|
|
505
505
|
"This mcp server cannot be installed because {0}",
|
|
506
506
|
allowedToInstall.value
|
|
507
507
|
)));
|
|
@@ -5,8 +5,8 @@ import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
|
5
5
|
import { ConfigurationTarget } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration";
|
|
6
6
|
import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service";
|
|
7
7
|
import { IUriIdentityService } from "@codingame/monaco-vscode-api/vscode/vs/platform/uriIdentity/common/uriIdentity.service";
|
|
8
|
-
import { IInstallableMcpServer } from "@codingame/monaco-vscode-
|
|
9
|
-
import { IMcpServerConfiguration, IMcpServerVariable } from "@codingame/monaco-vscode-
|
|
8
|
+
import { IInstallableMcpServer } from "@codingame/monaco-vscode-api/vscode/vs/platform/mcp/common/mcpManagement";
|
|
9
|
+
import { IMcpServerConfiguration, IMcpServerVariable } from "@codingame/monaco-vscode-api/vscode/vs/platform/mcp/common/mcpPlatformTypes";
|
|
10
10
|
import { IMcpResourceScannerService } from "@codingame/monaco-vscode-api/vscode/vs/platform/mcp/common/mcpResourceScannerService.service";
|
|
11
11
|
export interface IScannedMcpServers {
|
|
12
12
|
servers?: IStringDictionary<Mutable<IMcpServerConfiguration>>;
|
|
@@ -11,7 +11,7 @@ import { toFileOperationResult, FileOperationResult } from '@codingame/monaco-vs
|
|
|
11
11
|
import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service';
|
|
12
12
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/extensions';
|
|
13
13
|
import { IUriIdentityService } from '@codingame/monaco-vscode-api/vscode/vs/platform/uriIdentity/common/uriIdentity.service';
|
|
14
|
-
import { McpServerType } from '@codingame/monaco-vscode-
|
|
14
|
+
import { McpServerType } from '@codingame/monaco-vscode-api/vscode/vs/platform/mcp/common/mcpPlatformTypes';
|
|
15
15
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
16
16
|
|
|
17
17
|
let McpResourceScannerService = class McpResourceScannerService extends Disposable {
|
|
@@ -4,21 +4,21 @@ import { registerAction2 } from '@codingame/monaco-vscode-api/vscode/vs/platform
|
|
|
4
4
|
import { SyncDescriptor } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/descriptors';
|
|
5
5
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/extensions';
|
|
6
6
|
import { Extensions } from '@codingame/monaco-vscode-api/vscode/vs/platform/jsonschemas/common/jsonContributionRegistry';
|
|
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 { Extensions as Extensions$1 } from '@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickAccess';
|
|
9
9
|
import { Registry } from '@codingame/monaco-vscode-api/vscode/vs/platform/registry/common/platform';
|
|
10
|
-
import { EditorPaneDescriptor } from '@codingame/monaco-vscode-
|
|
10
|
+
import { EditorPaneDescriptor } from '@codingame/monaco-vscode-api/vscode/vs/workbench/browser/editor';
|
|
11
11
|
import { Extensions as Extensions$2 } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/configuration';
|
|
12
12
|
import { registerWorkbenchContribution2, WorkbenchPhase } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions';
|
|
13
13
|
import { EditorExtensions } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor';
|
|
14
|
-
import { mcpSchemaId } from '@codingame/monaco-vscode-
|
|
14
|
+
import { mcpSchemaId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/configuration/common/configuration';
|
|
15
15
|
import { ExtensionMcpDiscovery } from '../common/discovery/extensionMcpDiscovery.js';
|
|
16
16
|
import { InstalledMcpServersDiscovery } from '../common/discovery/installedMcpServersDiscovery.js';
|
|
17
17
|
import { mcpDiscoveryRegistry } from '../common/discovery/mcpDiscovery.js';
|
|
18
18
|
import { RemoteNativeMpcDiscovery } from '../common/discovery/nativeMcpRemoteDiscovery.js';
|
|
19
19
|
import { CursorWorkspaceMcpDiscoveryAdapter } from '../common/discovery/workspaceMcpDiscoveryAdapter.js';
|
|
20
|
-
import { McpCommandIds } from '@codingame/monaco-vscode-
|
|
21
|
-
import { mcpServerSchema } from '@codingame/monaco-vscode-
|
|
20
|
+
import { McpCommandIds } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpCommandIds';
|
|
21
|
+
import { mcpServerSchema } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpConfiguration';
|
|
22
22
|
import { McpContextKeysController } from '../common/mcpContextKeys.js';
|
|
23
23
|
import '../common/mcpDevMode.js';
|
|
24
24
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
@@ -78,15 +78,15 @@ registerWorkbenchContribution2(McpConfigMigrationContribution.ID, McpConfigMigra
|
|
|
78
78
|
registerWorkbenchContribution2(McpServersViewsContribution.ID, McpServersViewsContribution, WorkbenchPhase.AfterRestored);
|
|
79
79
|
const jsonRegistry = ( Registry.as(Extensions.JSONContribution));
|
|
80
80
|
jsonRegistry.registerSchema(mcpSchemaId, mcpServerSchema);
|
|
81
|
-
( Registry.as(EditorExtensions.EditorPane)).registerEditorPane(EditorPaneDescriptor.create(McpServerEditor, McpServerEditor.ID, ( localize(
|
|
81
|
+
( Registry.as(EditorExtensions.EditorPane)).registerEditorPane(EditorPaneDescriptor.create(McpServerEditor, McpServerEditor.ID, ( localize(8692, "MCP Server"))), [
|
|
82
82
|
( new SyncDescriptor(McpServerEditorInput))
|
|
83
83
|
]);
|
|
84
84
|
( Registry.as(Extensions$1.Quickaccess)).registerQuickAccessProvider({
|
|
85
85
|
ctor: McpResourceQuickAccess,
|
|
86
86
|
prefix: McpResourceQuickAccess.PREFIX,
|
|
87
|
-
placeholder: ( localize(
|
|
87
|
+
placeholder: ( localize(8693, "Filter to an MCP resource")),
|
|
88
88
|
helpEntries: [{
|
|
89
|
-
description: ( localize(
|
|
89
|
+
description: ( localize(8694, "MCP Server Resources")),
|
|
90
90
|
commandId: McpCommandIds.AddConfiguration
|
|
91
91
|
}]
|
|
92
92
|
});
|
|
@@ -2,11 +2,12 @@ import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/l
|
|
|
2
2
|
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
3
3
|
import { IWorkbenchContribution } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions";
|
|
4
4
|
import { IChatContextPickService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatContextPickService.service";
|
|
5
|
+
import { IMcpService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpTypes.service";
|
|
5
6
|
export declare class McpAddContextContribution extends Disposable implements IWorkbenchContribution {
|
|
6
7
|
private readonly _chatContextPickService;
|
|
7
|
-
private readonly
|
|
8
|
+
private readonly _instantiationService;
|
|
8
9
|
private readonly _addContextMenu;
|
|
9
|
-
constructor(_chatContextPickService: IChatContextPickService,
|
|
10
|
+
constructor(_chatContextPickService: IChatContextPickService, _instantiationService: IInstantiationService, mcpService: IMcpService);
|
|
10
11
|
private _registerAddContextMenu;
|
|
11
12
|
private _getResourcePicks;
|
|
12
13
|
}
|
|
@@ -1,24 +1,39 @@
|
|
|
1
1
|
|
|
2
2
|
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
3
|
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
4
|
-
import { CancellationError } from '@codingame/monaco-vscode-api/vscode/vs/base/common/errors';
|
|
5
4
|
import { Disposable, MutableDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
6
5
|
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
7
6
|
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
8
7
|
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
9
8
|
import { IChatContextPickService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatContextPickService.service';
|
|
9
|
+
import { McpCapability } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpTypes';
|
|
10
|
+
import { IMcpService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpTypes.service';
|
|
10
11
|
import { McpResourcePickHelper } from './mcpResourceQuickAccess.js';
|
|
12
|
+
import { derived } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/derived';
|
|
11
13
|
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
12
|
-
import { observableValue } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableValue';
|
|
13
14
|
|
|
14
15
|
let McpAddContextContribution = class McpAddContextContribution extends Disposable {
|
|
15
|
-
constructor(_chatContextPickService,
|
|
16
|
+
constructor(_chatContextPickService, _instantiationService, mcpService) {
|
|
16
17
|
super();
|
|
17
18
|
this._chatContextPickService = _chatContextPickService;
|
|
19
|
+
this._instantiationService = _instantiationService;
|
|
18
20
|
this._addContextMenu = this._register(( new MutableDisposable()));
|
|
19
|
-
|
|
21
|
+
const hasServersWithResources = derived(reader => {
|
|
22
|
+
let enabled = false;
|
|
23
|
+
for (const server of mcpService.servers.read(reader)) {
|
|
24
|
+
const cap = server.capabilities.read(undefined);
|
|
25
|
+
if (cap === undefined) {
|
|
26
|
+
enabled = true;
|
|
27
|
+
}
|
|
28
|
+
else if (cap & McpCapability.Resources) {
|
|
29
|
+
enabled = true;
|
|
30
|
+
break;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return enabled;
|
|
34
|
+
});
|
|
20
35
|
this._register(autorun(reader => {
|
|
21
|
-
const enabled =
|
|
36
|
+
const enabled = hasServersWithResources.read(reader);
|
|
22
37
|
if (enabled && !this._addContextMenu.value) {
|
|
23
38
|
this._registerAddContextMenu();
|
|
24
39
|
}
|
|
@@ -30,22 +45,32 @@ let McpAddContextContribution = class McpAddContextContribution extends Disposab
|
|
|
30
45
|
_registerAddContextMenu() {
|
|
31
46
|
this._addContextMenu.value = this._chatContextPickService.registerChatContextItem({
|
|
32
47
|
type: 'pickerPick',
|
|
33
|
-
label: ( localize(
|
|
48
|
+
label: ( localize(8695, "MCP Resources...")),
|
|
34
49
|
icon: Codicon.mcp,
|
|
35
50
|
isEnabled(widget) {
|
|
36
51
|
return !!widget.attachmentCapabilities.supportsMCPAttachments;
|
|
37
52
|
},
|
|
38
|
-
asPicker: () =>
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
53
|
+
asPicker: () => {
|
|
54
|
+
const helper = this._instantiationService.createInstance(McpResourcePickHelper);
|
|
55
|
+
return {
|
|
56
|
+
placeholder: ( localize(8696, "Select MCP Resource...")),
|
|
57
|
+
picks: (_query, token) => this._getResourcePicks(token, helper),
|
|
58
|
+
goBack: () => {
|
|
59
|
+
return helper.navigateBack();
|
|
60
|
+
},
|
|
61
|
+
dispose: () => {
|
|
62
|
+
helper.dispose();
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
},
|
|
42
66
|
});
|
|
43
67
|
}
|
|
44
|
-
_getResourcePicks(token) {
|
|
45
|
-
const
|
|
46
|
-
this
|
|
68
|
+
_getResourcePicks(token, helper) {
|
|
69
|
+
const picksObservable = helper.getPicks(token);
|
|
70
|
+
return derived(this, reader => {
|
|
71
|
+
const pickItems = picksObservable.read(reader);
|
|
47
72
|
const picks = [];
|
|
48
|
-
for (const [server, resources] of
|
|
73
|
+
for (const [server, resources] of pickItems.picks) {
|
|
49
74
|
if (resources.length === 0) {
|
|
50
75
|
continue;
|
|
51
76
|
}
|
|
@@ -53,27 +78,18 @@ let McpAddContextContribution = class McpAddContextContribution extends Disposab
|
|
|
53
78
|
for (const resource of resources) {
|
|
54
79
|
picks.push({
|
|
55
80
|
...McpResourcePickHelper.item(resource),
|
|
56
|
-
asAttachment: () =>
|
|
57
|
-
if (!r) {
|
|
58
|
-
throw ( new CancellationError());
|
|
59
|
-
}
|
|
60
|
-
else {
|
|
61
|
-
return r;
|
|
62
|
-
}
|
|
63
|
-
}),
|
|
81
|
+
asAttachment: () => helper.toAttachment(resource, server)
|
|
64
82
|
});
|
|
65
83
|
}
|
|
66
84
|
}
|
|
67
|
-
|
|
68
|
-
}, token).finally(() => {
|
|
69
|
-
observable.set({ busy: false, picks: observable.get().picks }, undefined);
|
|
85
|
+
return { picks, busy: pickItems.isBusy };
|
|
70
86
|
});
|
|
71
|
-
return observable;
|
|
72
87
|
}
|
|
73
88
|
};
|
|
74
89
|
McpAddContextContribution = ( __decorate([
|
|
75
90
|
( __param(0, IChatContextPickService)),
|
|
76
|
-
( __param(1, IInstantiationService))
|
|
91
|
+
( __param(1, IInstantiationService)),
|
|
92
|
+
( __param(2, IMcpService))
|
|
77
93
|
], McpAddContextContribution));
|
|
78
94
|
|
|
79
95
|
export { McpAddContextContribution };
|