feat(消息通知): 添加对markdown格式消息的支持
新增send_markdown函数用于发送富文本格式消息,替换原有send_text调用以支持代码块、标题等格式内容显示。自动分割长消息为多个卡片发送,提升消息展示效果。
This commit is contained in:
+2
-2
@@ -96,10 +96,10 @@ async def handle_task_complete(msg: TaskComplete) -> None:
|
||||
"""Handle a task completion notification from a host client."""
|
||||
logger.info("Task %s completed for user %s", msg.task_id, msg.user_id)
|
||||
|
||||
from bot.feishu import send_text
|
||||
from bot.feishu import send_markdown
|
||||
|
||||
try:
|
||||
await send_text(msg.chat_id, "chat_id", msg.result)
|
||||
await send_markdown(msg.chat_id, "chat_id", msg.result)
|
||||
except Exception as e:
|
||||
logger.error("Failed to send task completion notification: %s", e)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user