feat(cli): /status shows reasoning, approval mode, and context usage (C-02)
This commit is contained in:
@@ -94,6 +94,30 @@ def test_show_session_status_prints_gateway_style_summary():
|
||||
assert kwargs.get("markup") is False
|
||||
|
||||
|
||||
def test_show_session_status_includes_reasoning_approvals_context():
|
||||
"""C-02: /status surfaces reasoning level, approval mode, and context %."""
|
||||
cli_obj = _make_cli()
|
||||
cli_obj.agent = SimpleNamespace(session_total_tokens=1000, session_api_calls=2,
|
||||
reasoning_config={"enabled": True, "effort": "high"})
|
||||
cli_obj.reasoning_config = {"enabled": True, "effort": "high"}
|
||||
cli_obj.show_reasoning = True
|
||||
cli_obj.session_key = ""
|
||||
cli_obj._session_db.get_session.return_value = {"started_at": 1775791440}
|
||||
cli_obj._get_status_bar_snapshot = lambda: {
|
||||
"context_tokens": 50000, "context_length": 200000, "context_percent": 25,
|
||||
}
|
||||
|
||||
with patch("cli.display_hermes_home", return_value="~/.hermes"), \
|
||||
patch("tools.approval._get_approval_mode", return_value="manual"), \
|
||||
patch("tools.approval.is_approval_bypass_active_for_session", return_value=False):
|
||||
cli_obj._show_session_status()
|
||||
|
||||
printed = "\n".join(str(call.args[0]) for call in cli_obj.console.print.call_args_list)
|
||||
assert "Reasoning: high (display: on)" in printed
|
||||
assert "Approvals: manual" in printed
|
||||
assert "Context: 75% left · 50,000 / 200,000 tokens used" in printed
|
||||
|
||||
|
||||
def test_profile_command_reports_custom_root_profile(monkeypatch, tmp_path, capsys):
|
||||
"""Profile detection works for custom-root deployments (not under ~/.hermes)."""
|
||||
cli_obj = _make_cli()
|
||||
|
||||
Reference in New Issue
Block a user