refactor: 替换 asyncio.get_event_loop 为 get_running_loop 并优化会话卡片

- 将多处 asyncio.get_event_loop() 替换为更安全的 asyncio.get_running_loop()
- 重构 Feishu 卡片功能,新增 build_sessions_card 方法显示所有会话
- 优化文件路径处理逻辑,支持绝对路径和相对路径
- 在健康检查接口中添加 pending_requests 计数
- 更新会话状态命令以支持卡片显示
This commit is contained in:
Yuyao Huang (Sam)
2026-03-28 14:59:33 +08:00
parent 09b63341cd
commit a3622ce26d
7 changed files with 71 additions and 89 deletions
+1 -1
View File
@@ -130,7 +130,7 @@ class NodeClient:
sessions = manager.list_sessions()
active_sessions = [
{"conv_id": s["conv_id"], "working_dir": s["working_dir"]}
{"conv_id": s["conv_id"], "working_dir": s["cwd"]}
for s in sessions
]