mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-25 05:52:34 +00:00
fix(tools): forward thread_id via metadata in _send_via_adapter live path
The live adapter path in _send_via_adapter called adapter.send() without
passing thread_id, while the standalone fallback path correctly forwarded
it. For plugin platforms (google_chat, teams, irc, line) running with the
gateway in-process, this caused every threaded reply to land as a new
top-level message instead of continuing the thread.
Matches the pattern already used by _send_matrix_via_adapter and
_send_feishu: build metadata={"thread_id": thread_id} and pass it through.
This commit is contained in:
parent
e77fd75c44
commit
420762f867
1 changed files with 2 additions and 1 deletions
|
|
@ -461,7 +461,8 @@ async def _send_via_adapter(
|
||||||
adapter = None
|
adapter = None
|
||||||
if adapter is not None:
|
if adapter is not None:
|
||||||
try:
|
try:
|
||||||
result = await adapter.send(chat_id=chat_id, content=chunk)
|
metadata = {"thread_id": thread_id} if thread_id else None
|
||||||
|
result = await adapter.send(chat_id=chat_id, content=chunk, metadata=metadata)
|
||||||
except asyncio.CancelledError:
|
except asyncio.CancelledError:
|
||||||
raise
|
raise
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue