fix: move activated skills line below welcome text

Previously 'Activated skills: xxx' was printed above the banner in
show_banner(). Now it prints directly after the 'Welcome to Hermes
Agent!' line in run(), which is a more natural placement.
This commit is contained in:
Teknium
2026-03-23 06:20:19 -07:00
parent b072737193
commit f60ebc7bf2
2 changed files with 10 additions and 14 deletions

13
cli.py
View File

@@ -1963,13 +1963,6 @@ class HermesCLI:
def show_banner(self):
"""Display the welcome banner in Claude Code style."""
self.console.clear()
if self.preloaded_skills and not self._startup_skills_line_shown:
skills_label = ", ".join(self.preloaded_skills)
self.console.print(
f"[bold {_accent_hex()}]Activated skills:[/] {skills_label}"
)
self.console.print()
self._startup_skills_line_shown = True
# Auto-compact for narrow terminals — the full banner with caduceus
# + tool list needs ~80 columns minimum to render without wrapping.
@@ -5949,6 +5942,12 @@ class HermesCLI:
_welcome_text = "Welcome to Hermes Agent! Type your message or /help for commands."
_welcome_color = "#FFF8DC"
self.console.print(f"[{_welcome_color}]{_welcome_text}[/]")
if self.preloaded_skills and not self._startup_skills_line_shown:
skills_label = ", ".join(self.preloaded_skills)
self.console.print(
f"[bold {_accent_hex()}]Activated skills:[/] {skills_label}"
)
self._startup_skills_line_shown = True
self.console.print()
# State for async operation

View File

@@ -106,7 +106,8 @@ def test_main_raises_for_unknown_preloaded_skill(monkeypatch):
cli_mod.main(skills="missing-skill", list_tools=True)
def test_show_banner_prints_preloaded_skills_once_before_banner():
def test_show_banner_does_not_print_skills():
"""show_banner() no longer prints the activated skills line — it moved to run()."""
cli_obj = _make_real_cli(compact=False)
cli_obj.preloaded_skills = ["hermes-agent-dev", "github-auth"]
cli_obj.console = MagicMock()
@@ -115,7 +116,6 @@ def test_show_banner_prints_preloaded_skills_once_before_banner():
"shutil.get_terminal_size", return_value=os.terminal_size((120, 40))
):
cli_obj.show_banner()
cli_obj.show_banner()
print_calls = [
call.args[0]
@@ -123,8 +123,5 @@ def test_show_banner_prints_preloaded_skills_once_before_banner():
if call.args and isinstance(call.args[0], str)
]
startup_lines = [line for line in print_calls if "Activated skills:" in line]
assert len(startup_lines) == 1
assert "Activated skills:" in startup_lines[0]
assert "hermes-agent-dev, github-auth" in startup_lines[0]
assert mock_banner.call_count == 2
assert len(startup_lines) == 0
assert mock_banner.call_count == 1