feat(honcho): show clickable session line on CLI startup

Display a one-line Honcho session indicator with an OSC 8 terminal
hyperlink after the banner. Also shown when /title remaps the session.
This commit is contained in:
Erosika
2026-03-12 12:30:42 -04:00
parent 2d35016b94
commit cd6e5e44e4
2 changed files with 57 additions and 0 deletions

14
cli.py
View File

@@ -2681,6 +2681,8 @@ class HermesCLI:
self.agent._honcho_session_key = new_key
from tools.honcho_tools import set_session_context
set_session_context(self.agent._honcho, new_key)
from agent.display import honcho_session_line, write_tty
write_tty(honcho_session_line(hcfg.workspace_id, new_key) + "\n")
_cprint(f" Honcho session: {old_key}{new_key}")
except Exception:
pass
@@ -3743,6 +3745,18 @@ class HermesCLI:
"""Run the interactive CLI loop with persistent input at bottom."""
self.show_banner()
# One-line Honcho session indicator (TTY-only, not captured by agent)
try:
from honcho_integration.client import HonchoClientConfig
from agent.display import honcho_session_line, write_tty
hcfg = HonchoClientConfig.from_global_config()
if hcfg.enabled:
sname = hcfg.resolve_session_name(session_id=self.session_id)
if sname:
write_tty(honcho_session_line(hcfg.workspace_id, sname) + "\n")
except Exception:
pass
# If resuming a session, load history and display it immediately
# so the user has context before typing their first message.
if self._resumed: