Commit 59958799 by jimchenqj

feat(agent_hub): 调整IM推理钩子的内容截断与替换逻辑

增加内容展示长度至25字符以提供更多上下文,同时将"下载"替换为"点击"优化表述
1 parent eb0705bc
...@@ -41,7 +41,7 @@ async def _im_post_reasoning_hook( ...@@ -41,7 +41,7 @@ async def _im_post_reasoning_hook(
if not content: if not content:
return None return None
# 中间过程只发前10个字符 + 省略号 # 中间过程只发前10个字符 + 省略号
content = content[:10] + "..." if len(content) > 10 else content content = content[:25] + "..." if len(content) > 10 else content
# 删除"下载"这个词 # 删除"下载"这个词
content = content.replace("下载", "点击") content = content.replace("下载", "点击")
logger.info(f"[Hook 发送 IM] agent={self.name} bot_id={bot_id} content={content[:50]}...") logger.info(f"[Hook 发送 IM] agent={self.name} bot_id={bot_id} content={content[:50]}...")
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!