Path: blob/main/src/vs/workbench/services/mcp/electron-browser/mcpGalleryManifestService.ts
5220 views
/*---------------------------------------------------------------------------------------------1* Copyright (c) Microsoft Corporation. All rights reserved.2* Licensed under the MIT License. See License.txt in the project root for license information.3*--------------------------------------------------------------------------------------------*/45import { IConfigurationService } from '../../../../platform/configuration/common/configuration.js';6import { InstantiationType, registerSingleton } from '../../../../platform/instantiation/common/extensions.js';7import { ISharedProcessService } from '../../../../platform/ipc/electron-browser/services.js';8import { IProductService } from '../../../../platform/product/common/productService.js';9import { IRemoteAgentService } from '../../remote/common/remoteAgentService.js';10import { ILogService } from '../../../../platform/log/common/log.js';11import { IRequestService } from '../../../../platform/request/common/request.js';12import { IMcpGalleryManifestService } from '../../../../platform/mcp/common/mcpGalleryManifest.js';13import { WorkbenchMcpGalleryManifestService } from '../browser/mcpGalleryManifestService.js';1415export class McpGalleryManifestService extends WorkbenchMcpGalleryManifestService implements IMcpGalleryManifestService {1617constructor(18@IProductService productService: IProductService,19@IRemoteAgentService remoteAgentService: IRemoteAgentService,20@IRequestService requestService: IRequestService,21@ILogService logService: ILogService,22@ISharedProcessService sharedProcessService: ISharedProcessService,23@IConfigurationService configurationService: IConfigurationService,24) {25super(productService, remoteAgentService, requestService, logService, configurationService);2627const channel = sharedProcessService.getChannel('mcpGalleryManifest');28this.getMcpGalleryManifest().then(manifest => {29channel.call('setMcpGalleryManifest', [manifest]);30this._register(this.onDidChangeMcpGalleryManifest(manifest => channel.call('setMcpGalleryManifest', [manifest])));31});32}3334}3536registerSingleton(IMcpGalleryManifestService, McpGalleryManifestService, InstantiationType.Eager);373839