merge(dev_jacy): 修复 MCP Factory 注入

This commit is contained in:
2026-09-08 17:01:41 +08:00
@@ -1,10 +1,10 @@
import { Injectable, Logger } from '@nestjs/common';
import { Inject, Injectable, Logger } from '@nestjs/common';
import { allowedWecomPluginMcpTools } from '@dukang/shared-types';
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
import { StreamableHTTPServerTransport } from '@modelcontextprotocol/sdk/server/streamableHttp.js';
import type { IncomingMessage, ServerResponse } from 'node:http';
import { WECOM_PLUGIN_MCP_TOOL_DEFS } from './wecom-plugin-mcp.tools';
import type { WecomPluginQueryService } from './wecom-plugin-query.service';
import { WecomPluginQueryService } from './wecom-plugin-query.service';
import type { WecomPluginRuntime } from './wecom-plugin.types';
import { wecomPluginCaller } from './wecom-plugin.util';
@@ -34,7 +34,7 @@ export function createWecomPluginMcpServer(
export class WecomPluginMcpFactory {
private readonly logger = new Logger(WecomPluginMcpFactory.name);
constructor(private readonly query: WecomPluginQueryService) {}
constructor(@Inject(WecomPluginQueryService) private readonly query: WecomPluginQueryService) {}
async handle(
req: IncomingMessage & { body?: unknown; headers: IncomingMessage['headers'] },