Skip to content

The agent that grows with you

refactor(hermes_cli): read context_percent only in the tiers that render it

Tekniumee24ce7d7e9f
diff --git a/hermes_cli/cli_status_bar_mixin.py b/hermes_cli/cli_status_bar_mixin.py
index ec7aeb8b7dd..a57543e2935 100644
--- a/hermes_cli/cli_status_bar_mixin.py
+++ b/hermes_cli/cli_status_bar_mixin.py
@@ -993,7 +993,6 @@ class CLIStatusBarMixin:
if count:
add(name, style(count) if callable(style) else style, f"{glyph} {count}")
- percent = snapshot["context_percent"]
if _ok("model"):
if styled:
segs.append([(_SB, " ⚕ "), (_STRONG, model_short)])
@@ -1004,6 +1003,7 @@ class CLIStatusBarMixin:
# Narrow bars put duration ahead of the goal segment; the other tiers reverse it.
add("duration", _DIM, duration_label)
else:
+ percent = snapshot["context_percent"]
percent_label = f"{percent}%" if percent is not None else "--"
if wide and _ok("context_detail"):
if snapshot["context_length"]: