feat: support file comment reply reactions#380
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
✅ Files skipped from review due to trivial changes (3)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds decision-routing rules for media preview vs download (with whiteboard exception), delegates document comment/reaction intents to lark-drive, introduces Drive import-type routing for local files, and adds a Drive reactions reference plus a new reply-reaction API entry. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Client as Frontend
participant Router as DecisionLayer
participant CLI as lark-cli
participant Docs as lark-doc
participant Drive as lark-drive
Note over Router: New routing rules for media, imports, and reactions
User->>Client: request (preview/download media / comment/react / import file)
Client->>Router: evaluate intent & target
alt Media preview intent (non-whiteboard)
Router->>CLI: docs +media-preview
CLI->>Docs: preview request
Docs-->>Client: preview response
else Media download or whiteboard target
Router->>CLI: docs +media-download [--type whiteboard]
CLI->>Drive: fetch/download
Drive-->>Client: file stream
end
alt Comment or reaction intent
Router->>Drive: route to lark-drive (query/update)
Drive->>Drive: use file.comment.replys / file.comment.reply.reactions.update_reaction
Drive-->>Client: comment/reaction response
end
alt Local file import
Router->>CLI: drive +import --type <bitable|docx|sheet>
CLI->>Drive: import into Base/bitable/sheet
Drive->>Drive: post-import ops via lark-base only
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Greptile SummaryThis PR adds reaction (emoji) support for Drive comment replies by introducing a dedicated Confidence Score: 5/5Safe to merge — all findings are P2 or lower and do not affect production logic. The changes are documentation/skill-guidance only with no runtime code paths. The single new finding (potential skills/lark-drive/references/lark-drive-reactions.md — confirm Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
U([User Request]) --> D{Intent?}
D -->|Comment / Reaction| DRIVE[lark-drive]
D -->|Media preview| DOC_PREV[lark-cli docs +media-preview]
D -->|Media download| DOC_DL[lark-cli docs +media-download]
D -->|Local file import| IMPORT{File type?}
IMPORT -->|.xlsx/.csv → Base| IMP_B[drive +import --type bitable]
IMPORT -->|.md/.docx/.html → Doc| IMP_D[drive +import --type docx]
IMPORT -->|.xlsx/.xls/.csv → Sheet| IMP_S[drive +import --type sheet]
DRIVE --> R{Reaction op?}
R -->|Query| Q[file.comments list / batch_query\nfile.comment.replys list\nwith need_reaction=true]
R -->|Add / Delete| W[file.comment.reply.reactions\nupdate_reaction\naction=add or delete\nreply_id + reaction_type]
W --> RT[reaction_type must be\nexact enum from\nlark-drive-reactions.md]
Reviews (4): Last reviewed commit: "feat: support file comment reply reactio..." | Re-trigger Greptile |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@skills/lark-drive/SKILL.md`:
- Line 266: The mapping for file.comment.reply.reactions.update_reaction is
incorrect: inspect the API schema for the update_reaction operation (it supports
both add and delete via an action parameter) and change the scope mapping in
SKILL.md accordingly—replace docs:document.comment:create with
docs:document.comment:update if the operation is an update-only permission, or
include both docs:document.comment:create and docs:document.comment:update if
the API requires separate scopes for add vs delete; use the existing related
mapping for file.comment.replys.update as a reference when deciding which
scope(s) to apply.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: ac99d9cc-7694-45f4-aa78-d1bd889f5441
📒 Files selected for processing (5)
skill-template/domains/doc.mdskill-template/domains/drive.mdskills/lark-doc/SKILL.mdskills/lark-drive/SKILL.mdskills/lark-drive/references/lark-drive-reactions.md
🚀 PR Preview Install Guide🧰 CLI updatenpm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@c2404397007d26b30f8ba4c7d9a7a9bd0a3f1c3a🧩 Skill updatenpx skills add larksuite/cli#feat/file-comment-reply-reactions -y -g |
e03324d to
2304241
Compare
Change-Id: Ib75a35c438dc1c1aac32077ccc04a0de2ffef145
2304241 to
c240439
Compare
Change-Id: Ib75a35c438dc1c1aac32077ccc04a0de2ffef145
Summary
Add skill guidance for Drive comment/reply reaction support so agents can correctly read and update reactions in document comment threads. The surrounding doc and template updates mainly align routing, helping comment/reaction requests land in
lark-drivewith the right commands and parameters.Changes
lark-drivereaction reference covering reaction query/write flows, includingneed_reaction,reply_id,update_reaction, andreaction_typeusagelark-driveskill guidance to surface the reaction entry point, related API resource, and required scopelark-docand skill-template guidance so document comment/reaction scenarios are routed tolark-driveconsistentlyTest Plan
lark xxxcommand works as expectednode scripts/skill-format-check/index.jsRelated Issues
Summary by CodeRabbit
New Features
Documentation