mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-06-09 08:21:50 +00:00
fix(gateway): apply MarkdownV2 formatting on progress message edits
When a platform adapter sets REQUIRES_EDIT_FINALIZE=True (e.g. TelegramAdapter), tool progress edits now pass finalize=True so format_message() is applied before sending to the platform. Previously, the initial send() formatted the message correctly via MarkdownV2, but subsequent edit_message() calls skipped formatting (finalize=False), causing raw markdown (e.g. triple backticks for bash code blocks) to render as plain text on Telegram. Refs: #41955, #41732
This commit is contained in:
parent
aa424e51ac
commit
6d2732e786
1 changed files with 2 additions and 0 deletions
|
|
@ -13106,6 +13106,8 @@ class GatewayRunner(GatewayAuthorizationMixin, GatewayKanbanWatchersMixin, Gatew
|
|||
"message_id": message_id,
|
||||
"content": content,
|
||||
}
|
||||
if getattr(adapter, "REQUIRES_EDIT_FINALIZE", False):
|
||||
kwargs["finalize"] = True
|
||||
if _edit_accepts_metadata:
|
||||
kwargs["metadata"] = _progress_metadata
|
||||
return await adapter.edit_message(**kwargs)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue