mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-13 03:52:00 +00:00
refactor: replace 'cmp' text with 🗜️ emoji in status bar
Address review feedback to use the clamp emoji (��️) instead of the plain text 'cmp' prefix for the compression count indicator. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
103e11926f
commit
f5a232af84
2 changed files with 11 additions and 11 deletions
8
cli.py
8
cli.py
|
|
@ -2865,7 +2865,7 @@ class HermesCLI:
|
||||||
parts = [f"⚕ {snapshot['model_short']}", percent_label]
|
parts = [f"⚕ {snapshot['model_short']}", percent_label]
|
||||||
compressions = snapshot.get("compressions", 0)
|
compressions = snapshot.get("compressions", 0)
|
||||||
if compressions:
|
if compressions:
|
||||||
parts.append(f"cmp {compressions}")
|
parts.append(f"🗜️ {compressions}")
|
||||||
parts.append(duration_label)
|
parts.append(duration_label)
|
||||||
return self._trim_status_bar_text(" · ".join(parts), width)
|
return self._trim_status_bar_text(" · ".join(parts), width)
|
||||||
|
|
||||||
|
|
@ -2879,7 +2879,7 @@ class HermesCLI:
|
||||||
compressions = snapshot.get("compressions", 0)
|
compressions = snapshot.get("compressions", 0)
|
||||||
parts = [f"⚕ {snapshot['model_short']}", context_label, percent_label]
|
parts = [f"⚕ {snapshot['model_short']}", context_label, percent_label]
|
||||||
if compressions:
|
if compressions:
|
||||||
parts.append(f"cmp {compressions}")
|
parts.append(f"🗜️ {compressions}")
|
||||||
parts.append(duration_label)
|
parts.append(duration_label)
|
||||||
prompt_elapsed = snapshot.get("prompt_elapsed")
|
prompt_elapsed = snapshot.get("prompt_elapsed")
|
||||||
if prompt_elapsed:
|
if prompt_elapsed:
|
||||||
|
|
@ -2922,7 +2922,7 @@ class HermesCLI:
|
||||||
]
|
]
|
||||||
if compressions:
|
if compressions:
|
||||||
frags.append(("class:status-bar-dim", " · "))
|
frags.append(("class:status-bar-dim", " · "))
|
||||||
frags.append((self._compression_count_style(compressions), f"cmp {compressions}"))
|
frags.append((self._compression_count_style(compressions), f"🗜️ {compressions}"))
|
||||||
frags.extend([
|
frags.extend([
|
||||||
("class:status-bar-dim", " · "),
|
("class:status-bar-dim", " · "),
|
||||||
("class:status-bar-dim", duration_label),
|
("class:status-bar-dim", duration_label),
|
||||||
|
|
@ -2950,7 +2950,7 @@ class HermesCLI:
|
||||||
]
|
]
|
||||||
if compressions:
|
if compressions:
|
||||||
frags.append(("class:status-bar-dim", " │ "))
|
frags.append(("class:status-bar-dim", " │ "))
|
||||||
frags.append((self._compression_count_style(compressions), f"cmp {compressions}"))
|
frags.append((self._compression_count_style(compressions), f"🗜️ {compressions}"))
|
||||||
frags.extend([
|
frags.extend([
|
||||||
("class:status-bar-dim", " │ "),
|
("class:status-bar-dim", " │ "),
|
||||||
("class:status-bar-dim", duration_label),
|
("class:status-bar-dim", duration_label),
|
||||||
|
|
|
||||||
|
|
@ -221,7 +221,7 @@ class TestCLIStatusBar:
|
||||||
|
|
||||||
text = cli_obj._build_status_bar_text(width=120)
|
text = cli_obj._build_status_bar_text(width=120)
|
||||||
|
|
||||||
assert "cmp 3" in text
|
assert "🗜️ 3" in text
|
||||||
|
|
||||||
def test_compression_count_hidden_when_zero(self):
|
def test_compression_count_hidden_when_zero(self):
|
||||||
cli_obj = _attach_agent(
|
cli_obj = _attach_agent(
|
||||||
|
|
@ -237,7 +237,7 @@ class TestCLIStatusBar:
|
||||||
|
|
||||||
text = cli_obj._build_status_bar_text(width=120)
|
text = cli_obj._build_status_bar_text(width=120)
|
||||||
|
|
||||||
assert "cmp" not in text
|
assert "🗜️" not in text
|
||||||
|
|
||||||
def test_compression_count_shown_in_medium_status_bar(self):
|
def test_compression_count_shown_in_medium_status_bar(self):
|
||||||
cli_obj = _attach_agent(
|
cli_obj = _attach_agent(
|
||||||
|
|
@ -253,7 +253,7 @@ class TestCLIStatusBar:
|
||||||
|
|
||||||
text = cli_obj._build_status_bar_text(width=60)
|
text = cli_obj._build_status_bar_text(width=60)
|
||||||
|
|
||||||
assert "cmp 2" in text
|
assert "🗜️ 2" in text
|
||||||
|
|
||||||
def test_compression_count_hidden_in_narrow_status_bar(self):
|
def test_compression_count_hidden_in_narrow_status_bar(self):
|
||||||
cli_obj = _attach_agent(
|
cli_obj = _attach_agent(
|
||||||
|
|
@ -269,7 +269,7 @@ class TestCLIStatusBar:
|
||||||
|
|
||||||
text = cli_obj._build_status_bar_text(width=50)
|
text = cli_obj._build_status_bar_text(width=50)
|
||||||
|
|
||||||
assert "cmp" not in text
|
assert "🗜️" not in text
|
||||||
|
|
||||||
def test_compression_count_style_thresholds(self):
|
def test_compression_count_style_thresholds(self):
|
||||||
cli_obj = _make_cli()
|
cli_obj = _make_cli()
|
||||||
|
|
@ -297,9 +297,9 @@ class TestCLIStatusBar:
|
||||||
frags = cli_obj._get_status_bar_fragments()
|
frags = cli_obj._get_status_bar_fragments()
|
||||||
frag_texts = [text for _, text in frags]
|
frag_texts = [text for _, text in frags]
|
||||||
|
|
||||||
assert "cmp 7" in frag_texts
|
assert "🗜️ 7" in frag_texts
|
||||||
frag_styles = {text: style for style, text in frags}
|
frag_styles = {text: style for style, text in frags}
|
||||||
assert frag_styles["cmp 7"] == "class:status-bar-warn"
|
assert frag_styles["🗜️ 7"] == "class:status-bar-warn"
|
||||||
|
|
||||||
def test_compression_count_absent_from_fragments_when_zero(self):
|
def test_compression_count_absent_from_fragments_when_zero(self):
|
||||||
cli_obj = _attach_agent(
|
cli_obj = _attach_agent(
|
||||||
|
|
@ -317,7 +317,7 @@ class TestCLIStatusBar:
|
||||||
frags = cli_obj._get_status_bar_fragments()
|
frags = cli_obj._get_status_bar_fragments()
|
||||||
frag_texts = [text for _, text in frags]
|
frag_texts = [text for _, text in frags]
|
||||||
|
|
||||||
assert not any("cmp" in t for t in frag_texts)
|
assert not any("🗜️" in t for t in frag_texts)
|
||||||
|
|
||||||
def test_minimal_tui_chrome_threshold(self):
|
def test_minimal_tui_chrome_threshold(self):
|
||||||
cli_obj = _make_cli()
|
cli_obj = _make_cli()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue