mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-25 00:51:20 +00:00
fix: route background process watcher notifications to Telegram forum topics (#1481)
Salvaged from PR #1146 by spanishflu-est1918. Background process progress/completion messages were sent with only chat_id, landing in the general topic instead of the originating forum topic. Thread the thread_id from HERMES_SESSION_THREAD_ID through the watcher payload and pass it as metadata to adapter.send() so Telegram routes notifications to the correct topic. The env var export (HERMES_SESSION_THREAD_ID in _set_session_env / _clear_session_env) already existed on main — this commit adds the missing watcher plumbing. Co-authored-by: spanishflu-est1918 <spanishflu-est1918@users.noreply.github.com>
This commit is contained in:
parent
c30505dddd
commit
4298c6fd9a
2 changed files with 6 additions and 2 deletions
|
|
@ -1066,6 +1066,7 @@ def terminal_tool(
|
|||
"session_key": session_key,
|
||||
"platform": os.getenv("HERMES_SESSION_PLATFORM", ""),
|
||||
"chat_id": os.getenv("HERMES_SESSION_CHAT_ID", ""),
|
||||
"thread_id": os.getenv("HERMES_SESSION_THREAD_ID", ""),
|
||||
})
|
||||
|
||||
return json.dumps(result_data, ensure_ascii=False)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue