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

This commit is contained in:
Teknium
2026-09-02 21:30:36 -07:00
parent 205d0f8ab5
commit ee24ce7d7e
+1 -1
View File
@@ -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"]: