diff options
| author | Adam Malczewski <[email protected]> | 2026-10-22 17:51:15 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-10-22 17:51:15 +0900 |
| commit | 75680eac7071c6968eaa5470686ad102a82103db (patch) | |
| tree | fa3a11a100136f102d5ee26404cb2ec5192ce43a /src/core/metrics/cache-timer.test.ts | |
| parent | 53686ae6446c5c59928244f65c08150fb564b375 (diff) | |
| download | dispatch-web-75680eac7071c6968eaa5470686ad102a82103db.tar.gz dispatch-web-75680eac7071c6968eaa5470686ad102a82103db.zip | |
feat(chunks): split live thinking at reasoning-end block boundaries
Diffstat (limited to 'src/core/metrics/cache-timer.test.ts')
| -rw-r--r-- | src/core/metrics/cache-timer.test.ts | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/core/metrics/cache-timer.test.ts b/src/core/metrics/cache-timer.test.ts index e55eff4..d450135 100644 --- a/src/core/metrics/cache-timer.test.ts +++ b/src/core/metrics/cache-timer.test.ts @@ -32,6 +32,11 @@ const ev = { turnId, delta: "x", }), + reasoningEnd: (turnId: string): AgentEvent => ({ + type: "reasoning-end", + conversationId: C, + turnId, + }), call: (turnId: string, stepId: string, toolCallId: string): AgentEvent => ({ type: "tool-call", conversationId: C, @@ -151,6 +156,16 @@ describe("foldCacheTimerEvent — step gaps", () => { expect(s.stepStamps.get("t1#0")).toBe(8_000); }); + it("treats a reasoning-end boundary as resumed output too", () => { + const s = run([ + [0, ev.call("t1", "t1#0", "a")], + [1_000, ev.stepComplete("t1", "t1#0")], + [9_000, ev.reasoningEnd("t1")], + ]); + expect(s.running).toBeNull(); + expect(s.stepStamps.get("t1#0")).toBe(8_000); + }); + it("stops on a tool-call or usage from a DIFFERENT step, not its own", () => { const base = run([ [0, ev.call("t1", "t1#0", "a")], |
