mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-29 06:31:32 +00:00
fix(telegram): re-trigger typing indicator after sending messages
Telegram clears the typing state when a new message is delivered. When the agent sends intermediate progress messages (like 'Checking:'), the '...typing' bubble disappears immediately and doesn't return until the next keepalive tick (up to 2s later). This makes Hermes appear unresponsive during multi-tool operations. Fix: call send_typing() immediately after successful message delivery to restart the typing indicator without waiting for the next keepalive tick. Fixes #25836
This commit is contained in:
parent
c9298bba06
commit
1856bd9cc8
1 changed files with 11 additions and 1 deletions
|
|
@ -1663,7 +1663,17 @@ class TelegramAdapter(BasePlatformAdapter):
|
|||
continue
|
||||
raise
|
||||
message_ids.append(str(msg.message_id))
|
||||
|
||||
|
||||
# Re-trigger typing indicator after sending a message.
|
||||
# Telegram clears the typing state when a new message is delivered,
|
||||
# so without this the "...typing" bubble disappears mid-response
|
||||
# (especially noticeable when the agent sends intermediate progress
|
||||
# messages like "Checking:" before running tools).
|
||||
try:
|
||||
await self.send_typing(chat_id, metadata=metadata)
|
||||
except Exception:
|
||||
pass # Typing failures are non-fatal
|
||||
|
||||
return SendResult(
|
||||
success=True,
|
||||
message_id=message_ids[0] if message_ids else None,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue