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'] },