feat(cli): add configurable status line fields - #17654
Conversation
teknium1
left a comment
There was a problem hiding this comment.
Thanks for the configurable classic-CLI status-bar work. The feature is still absent on current main (cli.py:5055-5243; hermes_cli/config.py:1837-1854), but the implementation needs two corrections during salvage.
Problems
cli.py:2529falls back to the first account-usage window forfive-hour-limit, andcli.py:2550labels it5h. Current main creates an OpenRouter window namedAPI key quotainagent/account_usage.py:653-657, so this can mislabel a non-time-based quota.cli.py:1981-1983caches the reasoning label only at startup./reasoningchangesself.reasoning_configand replaces the agent inhermes_cli/cli_commands_mixin.py:2541-2544, somodel-with-reasoningcan become stale.
Suggested changes
- Gate five-hour/weekly rendering on provider/window semantics and cover the OpenRouter case.
- Source the reasoning label from live state, with an in-session
/reasoningregression test. - Port the feature onto current status-bar/config locations rather than the April layout.
Automated hermes-sweeper review.
| label = _label(window) | ||
| if "session" in label or "five hour" in label or label.startswith("5h") or "primary" in label: | ||
| return window | ||
| return windows[0] |
There was a problem hiding this comment.
Do not fall back to windows[0] here. fetch_account_usage() also returns OpenRouter's API key quota window on current main (agent/account_usage.py:653-657), which this path will label as 5h at line 2550. Only render this field when the provider/window establishes five-hour semantics.
| self.status_line_fields = _normalize_status_line_fields( | ||
| CLI_CONFIG["display"].get("status_line", []) | ||
| ) | ||
| self.reasoning_effort_label = str( |
There was a problem hiding this comment.
/reasoning changes self.reasoning_config and resets the agent without updating this cached value (hermes_cli/cli_commands_mixin.py:2541-2544 on current main). Derive the label from live state or update it in the handler so model-with-reasoning does not remain stale.
Summary
display.status_linefield ordering for the live CLI status barstatus_lineis empty or unsetmodel-with-reasoning,current-dir,project-root,git-branch,context-usage,five-hour-limit,weekly-limit,fast-mode,used-tokens, andthread-titleTest Plan
python -m compileall -q cli.py hermes_cli/config.pypython -m pytest tests/cli/test_cli_status_bar.py -q