feat(telegram): support rich Agent messages

This commit is contained in:
jxxghp
2026-08-22 10:11:18 +08:00
parent 1c07333909
commit 9273d68aa7
16 changed files with 444 additions and 33 deletions
+7
View File
@@ -2395,6 +2395,12 @@ class MoviePilotAgent:
发送 Agent 消息;后台任务不绑定原渠道,交由通知链广播。
"""
broadcast = self.is_background
rich_message = (
message
if not broadcast
and self.channel == NotificationChannel.Telegram.value
else None
)
self._save_assistant_display_message_once(message)
await AgentChain().async_post_message(
Message(
@@ -2407,6 +2413,7 @@ class MoviePilotAgent:
original_chat_id=None if broadcast else self.original_chat_id,
title=title,
text=message,
rich_message=rich_message,
save_history=False,
)
)