feat(cli): show resume-by-title command in exit summary (#3607)

When exiting a session that has a title (auto-generated or manual),
the exit summary now also shows:
  hermes -c "Session Title"
alongside the existing hermes --resume <id> command.

Also adds the title to the session info block.
This commit is contained in:
Teknium 2026-03-28 14:54:53 -07:00 committed by GitHub
parent 9009169eeb
commit 1b2d4f21f3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

12
cli.py
View file

@ -5891,10 +5891,22 @@ class HermesCLI:
else: else:
duration_str = f"{seconds}s" duration_str = f"{seconds}s"
# Look up session title for resume-by-name hint
session_title = None
if self._session_db:
try:
session_title = self._session_db.get_session_title(self.session_id)
except Exception:
pass
print("Resume this session with:") print("Resume this session with:")
print(f" hermes --resume {self.session_id}") print(f" hermes --resume {self.session_id}")
if session_title:
print(f" hermes -c \"{session_title}\"")
print() print()
print(f"Session: {self.session_id}") print(f"Session: {self.session_id}")
if session_title:
print(f"Title: {session_title}")
print(f"Duration: {duration_str}") print(f"Duration: {duration_str}")
print(f"Messages: {msg_count} ({user_msgs} user, {tool_calls} tool calls)") print(f"Messages: {msg_count} ({user_msgs} user, {tool_calls} tool calls)")
else: else: