From 750400470ecc041ce8bcebb10cf13d8852f3b86d Mon Sep 17 00:00:00 2001 From: Askhz <1361267452@qq.com> Date: Wed, 13 May 2026 16:13:42 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20/agents/commands=20?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=20duplicate=20command=20name=20=E5=92=8C?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E5=A4=9A=E4=BD=99=20TUI=20=E5=91=BD=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. cost/index.ts 重导出 usage/index.ts,COMMANDS() 中移除 cost 避免 BuildManifest 重复校验 2. /command 端点只返回 prompt 类型的 skills 命令,排除 TUI 命令 Co-Authored-By: DeepSeek-V4-Pro-VIP --- src/commands.ts | 2 +- src/server/routes/info.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commands.ts b/src/commands.ts index b7f1c69c7..9d610fea3 100644 --- a/src/commands.ts +++ b/src/commands.ts @@ -314,7 +314,7 @@ const COMMANDS = memoize((): Command[] => [ // desktop, context, contextNonInteractive, - cost, + // cost 已重导出 usage/index.ts(name='usage', aliases=['cost','stats']), diff, doctor, effort, diff --git a/src/server/routes/info.ts b/src/server/routes/info.ts index 518f90c14..02a34ca08 100644 --- a/src/server/routes/info.ts +++ b/src/server/routes/info.ts @@ -32,7 +32,7 @@ export function createInfoRoutes(sessionManager: SessionManager): Hono { const commands = await getCommands(process.cwd()) return c.json( commands - .filter(cmd => !cmd.isHidden) + .filter(cmd => !cmd.isHidden && cmd.type === 'prompt') .map(cmd => ({ name: getCommandName(cmd), description: cmd.description,