接续 0.27.0 企业微信入站(此前只收文本)。 - wecom.download_media(media_id):走 media/get,成功回二进制流 + Content-Disposition 文件名,出错回 JSON errcode(40014/42001 重取 token);_filename_from_disposition 解 filename / filename* 两种形式。 - 回调按 MsgType 分支:image/file 下载后构造 InboundAttachment(kind/file_name/data,与 个人微信同结构)→ 喂同一 _run_channel_conversation,复用其落盘 + 拼 [用户上传的...] 行 (图片 agent 自调 look_at_image,文件走 Read)。纯图片/文件消息无文本时据附件行生成 text。 - 语音/视频/位置/链接/事件暂回 success 不处理;附件下载失败静默跳过(打日志)。 - dev.html「企业微信(仅推送)」文案纠正为「推送 + 对话」。 文件:core/wechat/wecom.py、web/app.py、web/static/dev.html。_filename_from_disposition + import 自测过。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| js | ||
| vendor | ||
| admin.html | ||
| dev.html | ||
| wechat_bind.html | ||