Feature request: expose Feishu Docs revision suggestions / track changes for AI agents
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 17.3k
- Forks
- 1.4k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 105
Description
lark-cli / AI Agent 反馈:希望支持读取飞书文档修订模式里的修订建议
建议标题
Feature request: expose Feishu Docs revision suggestions / track changes for AI agents
背景
飞书文档有“修订模式”。人在文档右侧栏可以看到修订建议卡片,例如:
- 新增:“铺”
- 删除:“得”
- 替换:将“是正确答案吗”替换成“OK 了吗”
这些修订建议对写作协作非常重要。用户会以为它们和普通评论一样,AI Agent 可以读取并按条处理。
当前现象
在 lark-cli 1.0.48 下,AI Agent 可以读取:
- 文档正文:
lark-cli docs +fetch --api-version v2 --doc <docx> --doc-format markdown - 普通评论:
lark-cli drive file.comments list --params '{"file_token":"<docx_token>","file_type":"docx","is_solved":false}'
但读不到“修订模式”里的修订建议。
实际测试里:
- 飞书右侧栏显示 21 条修订建议。
drive file.comments list查询未解决评论,返回items: []。- 不加
is_solved查询全部评论,仍返回items: []。 docs +fetch可以读到当前正文,但不会返回每条新增、删除、替换建议的元数据,也无法知道哪些内容是修订建议。
期望能力
希望 lark-cli 或底层开放 API 支持至少一种方式读取修订建议:
- 提供类似
docs +revision-suggestions list/docs +suggestions list的命令; - 或在
docs +fetch --detail full中可选择返回修订建议元数据; - 或在文档/评论 API 文档中明确说明“修订建议不是评论,当前 API 不支持读取”,避免 Agent 误判。
每条修订建议最好包含:
- 类型:insert / delete / replace
- 原文与建议文本
- 所在 block id 或可定位锚点
- 创建人、创建时间
- 状态:pending / accepted / rejected / resolved
为什么重要
AI Agent 在文档协作中经常需要处理用户反馈。普通评论可以读取,但修订模式更适合长稿协作。如果 Agent 读不到修订建议,就会出现:
- 用户明明已经在飞书右侧栏批了很多修改,Agent 却读不到;
- Agent 只能读取正文最终状态,无法理解每条修订建议的意图;
- 用户必须改用普通评论,工作流被迫变慢。
这个能力对“AI Agent + 飞书文档”的写作、审稿、法务合同、产品文档协作都很关键。
复现步骤
- 在飞书 Docx 文档中打开“修订模式”。
- 对正文做新增、删除、替换,右侧栏出现修订建议卡片。
- 执行:
lark-cli drive file.comments list --as user --params '{"file_token":"<docx_token>","file_type":"docx","is_solved":false}' --format json
- 再执行:
lark-cli drive file.comments list --as user --params '{"file_token":"<docx_token>","file_type":"docx"}' --format json
- 结果:普通评论为空,修订建议未返回。
环境
- OS:Windows
- lark-cli:1.0.48
- 文档类型:Feishu Docx
- 相关命令:
docs +fetch --api-version v2drive file.comments list
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the docs +fetch --api-version v2 and drive file.comments list command entry points and reviewing the corresponding Feishu Docs and comments API documentation. Determine whether revision suggestions have an available API representation; done means exposing their metadata through a supported command or documenting that the API cannot read them, with tests for the selected behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api, cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100