Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/src/vs/workbench/services/mcp/electron-browser/mcpGalleryManifestService.ts
5220 views
1
/*---------------------------------------------------------------------------------------------
2
* Copyright (c) Microsoft Corporation. All rights reserved.
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
*--------------------------------------------------------------------------------------------*/
5
6
import { IConfigurationService } from '../../../../platform/configuration/common/configuration.js';
7
import { InstantiationType, registerSingleton } from '../../../../platform/instantiation/common/extensions.js';
8
import { ISharedProcessService } from '../../../../platform/ipc/electron-browser/services.js';
9
import { IProductService } from '../../../../platform/product/common/productService.js';
10
import { IRemoteAgentService } from '../../remote/common/remoteAgentService.js';
11
import { ILogService } from '../../../../platform/log/common/log.js';
12
import { IRequestService } from '../../../../platform/request/common/request.js';
13
import { IMcpGalleryManifestService } from '../../../../platform/mcp/common/mcpGalleryManifest.js';
14
import { WorkbenchMcpGalleryManifestService } from '../browser/mcpGalleryManifestService.js';
15
16
export class McpGalleryManifestService extends WorkbenchMcpGalleryManifestService implements IMcpGalleryManifestService {
17
18
constructor(
19
@IProductService productService: IProductService,
20
@IRemoteAgentService remoteAgentService: IRemoteAgentService,
21
@IRequestService requestService: IRequestService,
22
@ILogService logService: ILogService,
23
@ISharedProcessService sharedProcessService: ISharedProcessService,
24
@IConfigurationService configurationService: IConfigurationService,
25
) {
26
super(productService, remoteAgentService, requestService, logService, configurationService);
27
28
const channel = sharedProcessService.getChannel('mcpGalleryManifest');
29
this.getMcpGalleryManifest().then(manifest => {
30
channel.call('setMcpGalleryManifest', [manifest]);
31
this._register(this.onDidChangeMcpGalleryManifest(manifest => channel.call('setMcpGalleryManifest', [manifest])));
32
});
33
}
34
35
}
36
37
registerSingleton(IMcpGalleryManifestService, McpGalleryManifestService, InstantiationType.Eager);
38
39