Chat token usage now contributes to Command Center token analytics totals alongside task execution usage. - Add durable chat token usage rows and persistence hooks for assistant and room messages. - Aggregate chat usage into token totals, time series, provider/model groups, CSV export, and dashboard counts. - Cover chat token persistence and analytics with core and dashboard tests. - Document the expanded dashboard token usage behavior and add a changeset for the published package. Files changed: .changeset/fn-7449-chat-token-totals.md | 7 + docs/dashboard-guide.md | 4 +- .../core/src/__tests__/token-analytics.test.ts | 146 ++++++++++++++++++ packages/core/src/chat-store.ts | 105 +++++++++++++ packages/core/src/chat-types.ts | 37 +++++ packages/core/src/db.ts | 52 ++++++- packages/core/src/index.ts | 3 + packages/core/src/token-analytics.ts | 167 +++++++++++++++++---- .../__tests__/CommandCenter.test.tsx | 4 +- .../components/command-center/areas/TokensArea.tsx | 4 + .../src/__tests__/chat-manager-cli-send.test.ts | 40 +++++ .../dashboard/src/__tests__/chat-manager.test.ts | 100 ++++++++++++ .../src/__tests__/command-center-csv.test.ts | 2 + packages/dashboard/src/chat.ts | 110 +++++++++++++- packages/dashboard/src/command-center-csv.ts | 3 + 15 files changed, 745 insertions(+), 39 deletions(-) Fusion-Task-Id: FN-7449 Fusion-Task-Lineage: f2bacbb6-93b9-4874-b431-2049981b66c1 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
Changeset Format Guide
Each changeset file in this directory describes one user-facing change for release notes.
Required body format
---
"@runfusion/fusion": minor
---
summary: Add a Command Center productivity control for LOC backfills.
category: feature
dev: Uses the new `fn_backfill_loc` tool; settings key `commandCenter.locBackfill`.
Fields
| Field | Required | Description |
|---|---|---|
summary |
Yes | One line, user-facing, max 120 chars. Describe what changed for the operator. |
category |
Yes | One of: feature, fix, breaking, security, performance, internal. |
dev |
No | Developer or migration detail. Preserved in per-package CHANGELOGs but excluded from distilled release notes. |
Audience
The summary is the only content that appears in end-user release notes by default. Write for Fusion operators — describe behavior, fixes, and what changed. Avoid internal class names, file paths, and implementation detail.
Bump types
patch— bug fixes, internal changesminor— new features, CLI additions, toolsmajor— breaking changes
Validation
Run pnpm check:changesets to validate. The linter runs in the PR-check gate and test:gate. Legacy freeform changesets pass with a warning during the transition period.