feat: 增强日志功能并添加rich依赖
- 添加rich库依赖以改进日志显示 - 在各模块添加详细调试日志,包括消息处理、命令执行和工具调用过程 - 使用RichHandler美化日志输出并抑制第三方库的噪音日志 - 在关键路径添加日志记录,便于问题排查
This commit is contained in:
+6
-1
@@ -47,7 +47,12 @@ async def send_text(receive_id: str, receive_id_type: str, text: str) -> None:
|
||||
text: message content.
|
||||
"""
|
||||
import json as _json
|
||||
content = _json.dumps({"text": _truncate(text)}, ensure_ascii=False)
|
||||
truncated = _truncate(text)
|
||||
logger.debug(
|
||||
"[feishu] send_text to=%s type=%s len=%d/%d text=%r",
|
||||
receive_id, receive_id_type, len(truncated), len(text), truncated[:120],
|
||||
)
|
||||
content = _json.dumps({"text": truncated}, ensure_ascii=False)
|
||||
|
||||
request = (
|
||||
CreateMessageRequest.builder()
|
||||
|
||||
Reference in New Issue
Block a user