Files
hermes-agent/apps/shared
Teknium b0e2b30915 fix: Desktop status bar shows the switched-to session's own cache hit and t/s
Switching sessions in Desktop left the previous session's cache-hit rate
and tokens-per-second painted in the status bar until a message was sent
in the new one (Discord report). The status bar reads one global usage
atom, and every switch MERGED the new session's snapshot into it, so any
readout the snapshot lacked kept the old session's value. The canonical
gateway's resume / session.info snapshot also carried no usage at all, so
nothing ever replaced them on the local path.

- Desktop: a warm switch paints the session's own cached usage reading
  at once (each session already keeps one, updated by every usage event);
  an authoritative resume snapshot replaces instead of merging. (The cold
  switch clear is the previous commit, salvaged from @kouyichi.)
- Gateway: resume and session.info snapshots carry the resident agent's
  status-bar usage (tui_usage of usage_stats), so reopening a session
  after an app restart shows its real cache hit and t/s. Agentless
  sessions send none rather than zeros that would erase the last reading.

Fixes #146430
2026-11-01 22:17:03 -08:00
..
2026-10-20 21:04:30 -04:00