Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Manages Feishu Drive files and folders, including uploads, downloads, moves, permissions, and local file imports.
Use this skill ↓13% 58%+46 ptsof test cases passed
Passed 14 of 24 test cases with the skill, and 3 of 24 without it.
3 of 3 safety checks passed
Not used yet
当用户需要根据评论定位文档正文位置、对文档做 review、区分多处相同引用文本,或把评论落点映射到 docs +fetch --detail with-ids 的内容时,docx 文档的评论查询必须带 need_relation=true。
file_type=docx 支持通过 need_relation=true 查询评论的位置,并返回可用于定位正文 block 的 relation、parent_type、parent_token 等字段。need_relation 查询评论位置。遇到 sheet、bitable、slides、普通文件等类型的评论时,不要承诺可以用 need_relation 精确定位正文位置,应退回普通评论字段、对应资源能力下钻或人工确认。分页列出评论时,把 need_relation 放在 query params:
lark-cli drive file.comments list \
--params '{"file_token":"<doc_token>","file_type":"docx","is_solved":false,"need_relation":true}'
已知评论 ID 批量查询时,把 need_relation 放在请求体里:
lark-cli drive file.comments batch_query \
--params '{"file_token":"<doc_token>","file_type":"docx"}' \
--data '{"comment_ids":["<comment_id>"],"need_relation":true}'
同时获取文档内容,并要求返回 block id:
lark-cli docs +fetch --api-version v2 --doc '<doc_token_or_url>' --detail with-ids
relation:评论在文档内容中的结构化位置。relation.relation 是一个 JSON 字符串,需要再解析一次;其中 positionInfo.blockID 是最关键字段,用于匹配 docs +fetch --detail with-ids 返回的文档 block。relation.content_deleted:评论引用的内容是否已被删除。为 true 时,不要假设还能在当前正文中找到原位置。parent_type:评论所在的父级嵌入资源类型。常见值包括 SHEET_BLOCK、BITABLE_BLOCK、WHITEBOARD_BLOCK,表示评论落在文档内嵌电子表格、多维表格或画板内部。parent_token:父级嵌入资源 token。对 sheet / bitable / whiteboard 内部评论,服务端可能无法给出内部单元格、记录或画板节点的文档 block 级 relation,但可以通过 parent_type + parent_token 定位到文档里的父级嵌入 block。Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.