From 8452eb4ec5b244d76684c97e725a436ee05a59a5 Mon Sep 17 00:00:00 2001 From: sean Date: Sat, 28 Jun 2025 14:40:10 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E6=95=B4=E5=90=88MCP=E5=91=BD?= =?UTF-8?q?=E4=BB=A4=E5=88=B0mcp=E7=9B=AE=E5=BD=95=20-=20=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E9=A1=B9=E7=9B=AE=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移动MCPServerCommand.js和MCPStreamableHttpCommand.js到lib/mcp/目录 - 删除空的lib/commands/目录,避免代码分散 - 更新bin/promptx.js中的import路径指向新位置 - 统一MCP相关代码到同一目录,提升代码组织性 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- src/bin/promptx.js | 4 ++-- src/lib/commands/index.js | 7 ------- src/lib/{commands => mcp}/MCPServerCommand.js | 0 src/lib/{commands => mcp}/MCPStreamableHttpCommand.js | 0 4 files changed, 2 insertions(+), 9 deletions(-) delete mode 100644 src/lib/commands/index.js rename src/lib/{commands => mcp}/MCPServerCommand.js (100%) rename src/lib/{commands => mcp}/MCPStreamableHttpCommand.js (100%) diff --git a/src/bin/promptx.js b/src/bin/promptx.js index 755627a..c9b3143 100755 --- a/src/bin/promptx.js +++ b/src/bin/promptx.js @@ -8,8 +8,8 @@ const logger = require('../lib/utils/logger') // 导入锦囊框架 const { cli } = require('../lib/core/pouch') // 导入MCP Server命令 -const { MCPServerCommand } = require('../lib/commands/MCPServerCommand') -const { MCPStreamableHttpCommand } = require('../lib/commands/MCPStreamableHttpCommand') +const { MCPServerCommand } = require('../lib/mcp/MCPServerCommand') +const { MCPStreamableHttpCommand } = require('../lib/mcp/MCPStreamableHttpCommand') // 创建主程序 const program = new Command() diff --git a/src/lib/commands/index.js b/src/lib/commands/index.js deleted file mode 100644 index c526822..0000000 --- a/src/lib/commands/index.js +++ /dev/null @@ -1,7 +0,0 @@ -const { MCPServerCommand } = require('./MCPServerCommand'); -const { MCPStreamableHttpCommand } = require('./MCPStreamableHttpCommand'); - -module.exports = { - MCPServerCommand, - MCPStreamableHttpCommand -}; \ No newline at end of file diff --git a/src/lib/commands/MCPServerCommand.js b/src/lib/mcp/MCPServerCommand.js similarity index 100% rename from src/lib/commands/MCPServerCommand.js rename to src/lib/mcp/MCPServerCommand.js diff --git a/src/lib/commands/MCPStreamableHttpCommand.js b/src/lib/mcp/MCPStreamableHttpCommand.js similarity index 100% rename from src/lib/commands/MCPStreamableHttpCommand.js rename to src/lib/mcp/MCPStreamableHttpCommand.js