Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/src/vs/workbench/contrib/mcp/browser/mcpGatewayToolBrokerContribution.ts
13401 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 { IWorkbenchContribution } from '../../../common/contributions.js';
7
import { ILogService } from '../../../../platform/log/common/log.js';
8
import { McpGatewayToolBrokerChannelName } from '../../../../platform/mcp/common/mcpGateway.js';
9
import { IRemoteAgentService } from '../../../services/remote/common/remoteAgentService.js';
10
import { IMcpService } from '../common/mcpTypes.js';
11
import { McpGatewayToolBrokerChannel } from '../common/mcpGatewayToolBrokerChannel.js';
12
13
export class McpGatewayToolBrokerContribution implements IWorkbenchContribution {
14
constructor(
15
@IRemoteAgentService remoteAgentService: IRemoteAgentService,
16
@IMcpService mcpService: IMcpService,
17
@ILogService logService: ILogService,
18
) {
19
remoteAgentService.getConnection()?.registerChannel(McpGatewayToolBrokerChannelName, new McpGatewayToolBrokerChannel(mcpService, logService));
20
}
21
}
22
23