Record and surface request first-token latency and tool processing duration in task logs. - Add optional agent log timing fields and persist them in file-backed task logs. - Track Time To First Token from the first visible model output per agent logger request. - Track FIFO tool durations for tool result and error rows without storing sensitive payloads. - Render TTFT and duration badges in task chat and agent log viewers with regression coverage. - Document the new persisted timing fields and add a patch changeset for the CLI package. Files changed: .changeset/fn-7503-agent-log-timing.md | 7 ++ docs/storage.md | 1 + .../src/__tests__/agent-log-file-store.test.ts | 35 ++++++ .../src/__tests__/store-agent-log-file.test.ts | 28 +++++ packages/core/src/agent-log-file-store.ts | 19 ++++ packages/core/src/store.ts | 13 +++ packages/core/src/types.ts | 4 + .../dashboard/app/components/AgentLogViewer.css | 33 ++++++ .../dashboard/app/components/AgentLogViewer.tsx | 39 ++++++- packages/dashboard/app/components/TaskChatTab.css | 23 +++- packages/dashboard/app/components/TaskChatTab.tsx | 17 ++- .../__tests__/AgentLogViewer.rendering.test.tsx | 24 +++++ .../app/components/__tests__/TaskChatTab.test.tsx | 18 ++++ packages/engine/src/__tests__/agent-logger.test.ts | 120 ++++++++++++++++++--- packages/engine/src/agent-logger.ts | 97 ++++++++++++++--- 15 files changed, 446 insertions(+), 32 deletions(-) Fusion-Task-Id: FN-7503 Fusion-Task-Lineage: 7e62034f-4c35-420d-a670-3f7f4a7948df Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
18 KiB
18 KiB