
























@@ -23,7 +23,7 @@ describe("usage-helpers", () => {
2323usage: { totalTokens: 100, totalCost: 0 },
2424};
2525const matches = filterSessionsByQuery([session], "key:agent:main:cron*");
26-expect(matches.sessions).toHaveLength(1);
26+expect(matches.sessions).toEqual([session]);
2727});
28282929it("supports numeric filters like minTokens/maxTokens", () => {
@@ -43,8 +43,8 @@ describe("usage-helpers", () => {
4343const res = parseToolSummary(
4444"[Tool: read]\n[Tool Result]\n[Tool: exec]\n[Tool: read]\n[Tool Result]",
4545);
46-expect(res.summary).toContain("read");
47-expect(res.summary).toContain("exec");
46+expect(res.summary).toBe("Tools: read×2, exec×1 (3 calls)");
47+expect(res.cleanContent).toBe("");
4848const firstTool = requireFirstTool(res.tools);
4949expect(firstTool[0]).toBe("read");
5050expect(firstTool[1]).toBe(2);
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。