feat(lark): 支持接收飞书图片消息 - #5945
Closed
kindaQ wants to merge 1 commit into
Closed
Conversation
|
@kindaQ is attempting to deploy a commit to the IndexLabs Team on Vercel. A member of the Team first needs to authorize it. |
Collaborator
|
Hi @kindaQ, thank you for putting this together and for the thorough test coverage. We confirmed that inbound Feishu/Lark image attachments are already being implemented in #5580. That PR covers the same core behavior here, including standalone and rich-text images, and also extends it to videos and a durable asynchronous media-ingestion lifecycle. To avoid maintaining two overlapping implementations, we are going to continue this work in #5580 and close this PR as superseded. We really appreciate your contribution and the care you put into it. Please feel free to follow #5580 for progress. Thanks again! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
这个 PR 做了什么?
让绑定到 Agent 的飞书机器人能够接收用户发送的图片,并将图片作为 Multica 附件传递给后续任务。修复前,飞书图片只会被展开成
[Image]占位符,图片二进制不会下载、落库,Agent 因而无法读取图片内容。思考路径
image消息,也可能嵌在带文字的post富文本消息中,因此需要保留原始消息内容并统一提取image_key。关联 Issue
暂无关联 Issue。
变更类型
具体改动
server/internal/integrations/lark/ws_frame_decoder.gocontent,供附件管线解析。[Image]文本占位,同时标记消息类型为图片。server/internal/integrations/lark/inbound_media.goimage和post富文本中的一个或多个图片键。server/internal/integrations/lark/http_client.goserver/internal/integrations/lark/feishu_resolvers.goserver/internal/integrations/channel/engine/session.goserver/cmd/server/router.go如何测试
go test ./internal/integrations/lark ./internal/integrations/channel/... ./internal/integrations/slackgo test ./... -run ^本地自动化测试和全量 Go 编译检查均已通过。
风险与边界
检查清单
AI 使用说明
使用的 AI 工具: Codex
方式: 用于分析飞书入站消息链路、实现图片下载与附件关联、补充测试,并根据测试结果修正图片加文字时使用
post消息类型的兼容问题。截图
不适用,本次为后端消息与附件管线改动。