gsxdsm
c468c161c2
FN-7141: add chat context token budget indicator
Add a desktop Direct-chat header indicator for estimated tokens used against the active model context window.
- Estimate chat token usage client-side, including streaming text, and format compact counts.
- Render the context-window badge only for non-mobile Direct-chat threads with known model context windows.
- Cover desktop, mobile, floating-narrow, rooms, unknown-context, and streaming surfaces with tests.
- Document the dashboard behavior and add a release changeset.
Files changed:
.changeset/fn-7141-chat-context-window.md | 7 +
docs/dashboard-guide.md | 2 +
packages/dashboard/app/components/ChatView.css | 22 +++
packages/dashboard/app/components/ChatView.tsx | 35 +++-
.../__tests__/ChatView.context-window.test.tsx | 193 +++++++++++++++++++++
.../app/utils/__tests__/estimateChatTokens.test.ts | 34 ++++
packages/dashboard/app/utils/estimateChatTokens.ts | 29 ++++
packages/i18n/locales/en/app.json | 1 +
8 files changed, 322 insertions(+), 1 deletion(-)
Fusion-Task-Id: FN-7141
Fusion-Task-Lineage: 3ede9af4-b8d6-4da6-996f-cd9277ef49ac
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-27 17:22:12 -07:00
..
2026-05-13 10:00:00 -07:00
2026-06-22 18:21:06 -07:00
2026-06-20 15:42:16 -07:00
2026-05-14 02:23:45 -07:00
2026-05-18 03:10:52 -07:00
2026-05-17 19:11:59 -07:00
2026-06-27 17:22:12 -07:00
2026-06-25 12:25:13 -07:00
2026-05-13 06:29:33 -07:00
2026-05-13 16:29:37 -07:00
2026-04-24 19:39:20 -07:00
2026-04-24 19:39:20 -07:00
2026-06-09 12:51:20 -07:00
2026-06-26 09:32:53 -07:00
2026-04-24 19:39:20 -07:00
2026-04-24 19:39:20 -07:00
2026-05-08 18:44:16 -07:00
2026-06-17 16:53:29 -07:00
2026-04-29 07:35:23 -07:00
2026-06-02 14:14:24 -07:00
2026-06-22 10:09:32 -07:00
2026-06-25 23:34:07 -07:00
2026-06-17 17:57:19 -07:00
2026-05-20 19:58:49 -07:00
2026-05-20 20:27:11 -07:00
2026-05-07 18:35:45 -07:00
2026-05-14 18:35:30 -07:00
2026-05-20 03:19:44 -07:00
2026-05-14 05:55:16 -07:00
2026-05-19 18:56:24 -07:00
2026-06-26 08:53:26 -07:00
2026-05-13 06:29:35 -07:00
2026-04-24 19:39:20 -07:00
2026-06-25 23:35:31 -07:00
2026-06-18 15:59:34 -07:00
2026-04-29 02:23:09 -07:00
2026-05-29 20:05:14 -07:00
2026-04-29 07:35:23 -07:00