mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-23 01:58:53 +01:00
mcp: initial data flow for MCP gateway
Adds base startGateway method and data flows. Currently the route is just a stub.
This commit is contained in:
@@ -121,6 +121,9 @@ import { normalizeNFC } from '../../base/common/normalization.js';
|
||||
import { ICSSDevelopmentService, CSSDevelopmentService } from '../../platform/cssDev/node/cssDevService.js';
|
||||
import { INativeMcpDiscoveryHelperService, NativeMcpDiscoveryHelperChannelName } from '../../platform/mcp/common/nativeMcpDiscoveryHelper.js';
|
||||
import { NativeMcpDiscoveryHelperService } from '../../platform/mcp/node/nativeMcpDiscoveryHelperService.js';
|
||||
import { IMcpGatewayService, McpGatewayChannelName } from '../../platform/mcp/common/mcpGateway.js';
|
||||
import { McpGatewayService } from '../../platform/mcp/node/mcpGatewayService.js';
|
||||
import { McpGatewayChannel } from '../../platform/mcp/node/mcpGatewayChannel.js';
|
||||
import { IWebContentExtractorService } from '../../platform/webContentExtractor/common/webContentExtractor.js';
|
||||
import { NativeWebContentExtractorService } from '../../platform/webContentExtractor/electron-main/webContentExtractorService.js';
|
||||
import ErrorTelemetry from '../../platform/telemetry/electron-main/errorTelemetry.js';
|
||||
@@ -1114,6 +1117,7 @@ export class CodeApplication extends Disposable {
|
||||
|
||||
// MCP
|
||||
services.set(INativeMcpDiscoveryHelperService, new SyncDescriptor(NativeMcpDiscoveryHelperService));
|
||||
services.set(IMcpGatewayService, new SyncDescriptor(McpGatewayService));
|
||||
|
||||
|
||||
// Dev Only: CSS service (for ESM)
|
||||
@@ -1235,6 +1239,8 @@ export class CodeApplication extends Disposable {
|
||||
// MCP
|
||||
const mcpDiscoveryChannel = ProxyChannel.fromService(accessor.get(INativeMcpDiscoveryHelperService), disposables);
|
||||
mainProcessElectronServer.registerChannel(NativeMcpDiscoveryHelperChannelName, mcpDiscoveryChannel);
|
||||
const mcpGatewayChannel = this._register(new McpGatewayChannel(mainProcessElectronServer, accessor.get(IMcpGatewayService)));
|
||||
mainProcessElectronServer.registerChannel(McpGatewayChannelName, mcpGatewayChannel);
|
||||
|
||||
// Logger
|
||||
const loggerChannel = new LoggerChannel(accessor.get(ILoggerMainService),);
|
||||
|
||||
Reference in New Issue
Block a user