From d0d5c9ac56a74786d4b0e31f255fa9940d674c09 Mon Sep 17 00:00:00 2001 From: jacy <18049821889@163.com> Date: Tue, 8 Sep 2026 17:01:30 +0800 Subject: [PATCH] =?UTF-8?q?fix(wecom):=20=E4=BF=AE=E5=A4=8D=20MCP=20Factor?= =?UTF-8?q?y=20=E6=B3=A8=E5=85=A5=E5=A4=B1=E8=B4=A5=E5=AF=BC=E8=87=B4=20AP?= =?UTF-8?q?I=20=E6=97=A0=E6=B3=95=E5=90=AF=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit WecomPluginQueryService 不能用 import type,否则 Nest 拿不到 design:type。 Co-authored-by: Cursor --- .../src/integrations/wecom/wecom-plugin-mcp.factory.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/dukang-api/src/integrations/wecom/wecom-plugin-mcp.factory.ts b/server/dukang-api/src/integrations/wecom/wecom-plugin-mcp.factory.ts index 6387c14..ff818ac 100644 --- a/server/dukang-api/src/integrations/wecom/wecom-plugin-mcp.factory.ts +++ b/server/dukang-api/src/integrations/wecom/wecom-plugin-mcp.factory.ts @@ -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'] },