Track and display per-session token usage in chat and sidebar #2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "t3code/add-token-count-chat-sidebar"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
usageonto assistant message metadata in the kernel, and relay it as a stream event.addUsage,usageTotal, andsumUsagehelpers in@hat/coreso totals are only summed when a provider actually reports them.usageBySession()./api/sessionsresponse.testscript and tests covering usage math, kernel persistence, store aggregation, and token formatting.Testing
pnpm --filter @hat/core testpnpm --filter @hat/kernel testpnpm --filter @hat/store-sqlite testpnpm --filter @hat/web testpnpm --filter @hat/web typecheck