hermes-agent/agent
Teknium 00a0c56598
feat: add persistent CLI status bar and usage details (#1522)
Salvaged from PR #1104 by kshitijk4poor. Closes #683.

Adds a persistent status bar to the CLI showing model name, context
window usage with visual bar, estimated cost, and session duration.
Responsive layout degrades gracefully for narrow terminals.

Changes:
- agent/usage_pricing.py: shared pricing table, cost estimation with
  Decimal arithmetic, duration/token formatting helpers
- agent/insights.py: refactored to reuse usage_pricing (eliminates
  duplicate pricing table and formatting logic)
- cli.py: status bar with FormattedTextControl fragments, color-coded
  context thresholds (green/yellow/orange/red), enhanced /usage with
  cost breakdown, 1Hz idle refresh for status bar updates
- tests/test_cli_status_bar.py: status bar snapshot, width collapsing,
  usage report with/without pricing, zero-priced model handling
- tests/test_insights.py: verify zero-priced providers show as unknown

Salvage fixes:
- Resolved conflict with voice status bar (both coexist in layout)
- Import _format_context_length from hermes_cli.banner (moved since PR)

Co-authored-by: kshitijk4poor <kshitijk4poor@users.noreply.github.com>
2026-03-16 04:42:48 -07:00
..
__init__.py Refactor Terminal and AIAgent cleanup 2026-02-21 22:31:43 -08:00
anthropic_adapter.py Merge origin/main into hermes/hermes-daa73839 2026-03-14 23:44:47 -07:00
auxiliary_client.py Merge origin/main into hermes/hermes-daa73839 2026-03-14 23:44:47 -07:00
context_compressor.py feat: improve context compaction handoff summaries (#1273) 2026-03-14 02:33:31 -07:00
display.py feat(tools): centralize tool emoji metadata in registry + skin integration 2026-03-15 20:21:21 -07:00
insights.py feat: add persistent CLI status bar and usage details (#1522) 2026-03-16 04:42:48 -07:00
model_metadata.py fix(anthropic): live model fetching + adaptive thinking for 4.5+ models 2026-03-12 17:04:31 -07:00
prompt_builder.py fix: suppress duplicate cron sends to auto-delivery targets 2026-03-14 19:07:50 -07:00
prompt_caching.py fix(cache_control) treat empty text like None to avoid anthropic api cache_control error 2026-03-13 18:08:46 -07:00
redact.py feat: secure skill env setup on load (core #688) 2026-03-13 03:14:04 -07:00
skill_commands.py fix: save /plan output in workspace (#1381) 2026-03-14 21:28:51 -07:00
trajectory.py Refactor Terminal and AIAgent cleanup 2026-02-21 22:31:43 -08:00
usage_pricing.py feat: add persistent CLI status bar and usage details (#1522) 2026-03-16 04:42:48 -07:00