From 92a978af3ca51c5fad12acc3aa12def6d63e5b91 Mon Sep 17 00:00:00 2001 From: "zeyu.fz" Date: Tue, 11 Aug 2026 17:39:40 +0800 Subject: [PATCH] =?UTF-8?q?fix(knowledge):=20=E9=AA=8C=E8=AF=81=E5=B9=B6?= =?UTF-8?q?=E9=99=90=E5=88=B6=E6=9F=A5=E8=AF=A2=E6=97=B6=E9=97=B4=E8=8C=83?= =?UTF-8?q?=E5=9B=B4=E4=B8=BA=E8=BF=87=E5=8E=BB=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修改时间参数说明,明确要求起止时间必须为过去时间 - 添加起始时间未来时报错机制,避免无意义查询 - 截断结束时间未来时间至当前时间,保障监控接口正确响应 - 添加测试覆盖,验证时间范围边界行为及错误处理 - 补充对应端到端测试路由映射,完善测试用例组织结构 --- .../src/commands/knowledge/kb-stats.ts | 25 ++++- .../knowledge/knowledge-kb-stats.e2e.test.ts | 95 +++++++++++++++++++ packages/commands/tests/e2e/topic-routes.ts | 4 + skills/bailian-cli/reference/knowledge.md | 17 ++-- 4 files changed, 130 insertions(+), 11 deletions(-) create mode 100644 packages/commands/tests/e2e/knowledge/knowledge-kb-stats.e2e.test.ts diff --git a/packages/commands/src/commands/knowledge/kb-stats.ts b/packages/commands/src/commands/knowledge/kb-stats.ts index 275d651..45f7a8f 100644 --- a/packages/commands/src/commands/knowledge/kb-stats.ts +++ b/packages/commands/src/commands/knowledge/kb-stats.ts @@ -21,12 +21,13 @@ const KB_STATS_FLAGS = { start: { type: "string", valueHint: "