* fix(tui): call maybe_auto_title for TUI sessions (#15961) The maybe_auto_title() helper is called from cli.py and gateway/run.py but was never wired into tui_gateway/server.py, so every session started via 'hermes --tui' landed in state.db with an empty title. Evidence from the issue reporter: 0/154 TUI sessions titled vs 91/383 CLI. Mirror the CLI/Gateway pattern: after emitting message.complete, when the turn finished cleanly, fire-and-forget title generation using the session key, user prompt, agent response, and current history. Fixes #15949. Co-authored-by: math0r-be <math0r-be@github.com> * chore(release): map math0r-be placeholder email in AUTHOR_MAP --------- Co-authored-by: math0r-be <math0r-be@github.com>
This commit is contained in:
@@ -2321,6 +2321,26 @@ def _(rid, params: dict) -> dict:
|
||||
payload["rendered"] = rendered
|
||||
_emit("message.complete", sid, payload)
|
||||
|
||||
if (
|
||||
status == "complete"
|
||||
and isinstance(raw, str)
|
||||
and raw.strip()
|
||||
and isinstance(text, str)
|
||||
and text.strip()
|
||||
):
|
||||
try:
|
||||
from agent.title_generator import maybe_auto_title
|
||||
|
||||
maybe_auto_title(
|
||||
_get_db(),
|
||||
session.get("session_key") or sid,
|
||||
text,
|
||||
raw,
|
||||
session.get("history", []),
|
||||
)
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
# CLI parity: when voice-mode TTS is on, speak the agent reply
|
||||
# (cli.py:_voice_speak_response). Only the final text — tool
|
||||
# calls / reasoning already stream separately and would be
|
||||
|
||||
Reference in New Issue
Block a user