mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-06-09 08:21:50 +00:00
Merge pull request #39482 from liuhao1024/fix/rich-markup-error-on-session-resume
fix(cli): use Rich [dim] tag instead of ANSI escape in session resume messages
This commit is contained in:
commit
66a6b9c930
2 changed files with 71 additions and 5 deletions
10
cli.py
10
cli.py
|
|
@ -5109,9 +5109,9 @@ class HermesCLI:
|
|||
resolved_id = self.session_id
|
||||
if resolved_id and resolved_id != self.session_id:
|
||||
ChatConsole().print(
|
||||
f"[{_DIM}]Session {_escape(self.session_id)} was compressed into "
|
||||
f"[dim]Session {_escape(self.session_id)} was compressed into "
|
||||
f"{_escape(resolved_id)}; resuming the descendant with your "
|
||||
f"transcript.[/]"
|
||||
f"transcript.[/dim]"
|
||||
)
|
||||
self.session_id = resolved_id
|
||||
resolved_meta = self._session_db.get_session(self.session_id)
|
||||
|
|
@ -5391,7 +5391,7 @@ class HermesCLI:
|
|||
if quiet:
|
||||
print(msg, file=sys.stderr)
|
||||
else:
|
||||
self._console_print(f"[{_DIM}]{_escape(msg)}[/]")
|
||||
self._console_print(f"[dim]{_escape(msg)}[/dim]")
|
||||
return
|
||||
|
||||
try:
|
||||
|
|
@ -5401,7 +5401,7 @@ class HermesCLI:
|
|||
if quiet:
|
||||
print(msg, file=sys.stderr)
|
||||
else:
|
||||
self._console_print(f"[{_DIM}]{_escape(msg)}[/]")
|
||||
self._console_print(f"[dim]{_escape(msg)}[/dim]")
|
||||
return
|
||||
|
||||
# Retarget the terminal/code-exec tools to match the process cwd.
|
||||
|
|
@ -5411,7 +5411,7 @@ class HermesCLI:
|
|||
if quiet:
|
||||
print(msg, file=sys.stderr)
|
||||
else:
|
||||
self._console_print(f"[{_DIM}]{_escape(msg)}[/]")
|
||||
self._console_print(f"[dim]{_escape(msg)}[/dim]")
|
||||
|
||||
def _preload_resumed_session(self) -> bool:
|
||||
"""Load a resumed session's history from the DB early (before first chat).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue