问题:当启用 send_progress 配置时,飞书通道不会显示进度通知,而其他通道(如 Telegram、Matrix)会显示。
复现步骤:
- 在配置文件中设置
send_progress: true
- 启动 nanobot 并连接飞书通道
- 发送一个需要执行工具的请求(如搜索或执行命令)
- 观察飞书聊天界面,没有显示进度通知
预期行为:
- 当执行工具时,飞书通道应该显示进度通知,告知用户当前正在执行的操作
- 进度通知应该与其他通道的行为一致
实际行为:
- 飞书通道没有显示任何进度通知
- 只有最终的回复会显示
原因分析:
- 飞书通道的
send 方法中没有对 _progress 标记的消息进行特殊处理
- 对比其他通道(如 Telegram、Matrix),它们都有专门的逻辑来处理 progress 消息
- 即使启用了
send_progress 配置,飞书通道也没有实现相应的处理逻辑
可能的解决方案:
在 feishu.py 文件中添加对 _progress 标记的处理:
# Handle progress messages
if msg.metadata.get("_progress"):
# If there's an active streaming card, add progress to it
buf = self._stream_bufs.get(msg.chat_id)
if buf and buf.card_id:
await self.send_delta(
msg.chat_id,
"\n\n" + msg.content + "\n\n",
msg.metadata
)
return
# No active streaming card, send as a regular message
# You could also add a special format for progress messages here
环境:
- nanobot version: v0.1.4.post6
- Feishu channel enabled
send_progress: true in config
问题:当启用
send_progress配置时,飞书通道不会显示进度通知,而其他通道(如 Telegram、Matrix)会显示。复现步骤:
send_progress: true预期行为:
实际行为:
原因分析:
send方法中没有对_progress标记的消息进行特殊处理send_progress配置,飞书通道也没有实现相应的处理逻辑可能的解决方案:
在 feishu.py 文件中添加对
_progress标记的处理:环境:
send_progress: truein config