HERMES-GIELIE/api
Nathan Esquenazi 2797e5189b feat: context window usage indicator with real agent data
The context indicator in the composer footer now shows real data from
the agent's context compressor instead of hardcoded estimates:

- last_prompt_tokens / context_length (e.g. '12.4k / 200k (6%)')
- Bar color: blue <50%, yellow 50-75%, red >75%
- Hover tooltip shows exact numbers + compression threshold
- Cost appended when available

Backend: streaming.py now reads context_length, threshold_tokens, and
last_prompt_tokens from agent.context_compressor after run_conversation()
and includes them in the usage dict sent with the 'done' SSE event.

This matches the CLI's context window display (the bar that shows
current context vs total window).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 18:50:17 -07:00
..
__init__.py Hermes Web UI — Sprints 11-14: multi-provider models, settings, session QoL, alerts, polish 2026-03-31 07:02:47 +00:00
auth.py fix(auth): redirect to /login when auth is enabled and accessing root 2026-04-03 06:21:04 -07:00
config.py Merge pull request #76 from vCillusion/fix/agent-dir-pip-shadow 2026-04-04 12:01:55 -07:00
helpers.py feat: Sprint 19 — password auth, security headers, login page 2026-04-03 05:53:26 -07:00
models.py fix: allow deleting CLI sessions from sidebar (#87) 2026-04-04 17:33:55 -07:00
profiles.py fix(review): 4 issues found in agent review of PR #45 2026-04-03 13:58:43 -07:00
routes.py fix: allow deleting CLI sessions from sidebar (#87) 2026-04-04 17:33:55 -07:00
streaming.py feat: context window usage indicator with real agent data 2026-04-04 18:50:17 -07:00
upload.py fix: stop leaking stack traces to clients in HTTP 500 responses 2026-04-03 06:41:32 -07:00
workspace.py fix: correct modified/untracked counting in git status parser 2026-04-04 14:25:07 -07:00