feat(vc): make document-context meeting events actionable for agents - #2155
feat(vc): make document-context meeting events actionable for agents#2155Ren1104 wants to merge 14 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (3)
📝 WalkthroughWalkthroughMeeting event handling now supports ChangesDocument Context Meeting Events
Estimated code review effort: 3 (Moderate) | ~20 minutes Suggested reviewers: Sequence Diagram(s)sequenceDiagram
participant MeetingEventPayload
participant DocumentContextTimeline
participant PrettyRenderer
MeetingEventPayload->>DocumentContextTimeline: provide document_context_changed items
DocumentContextTimeline->>DocumentContextTimeline: validate and describe supported items
DocumentContextTimeline->>PrettyRenderer: return ordered action entries
PrettyRenderer->>PrettyRenderer: render action descriptions without extra colons
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2155 +/- ##
==========================================
+ Coverage 75.65% 76.10% +0.44%
==========================================
Files 940 983 +43
Lines 99876 103532 +3656
==========================================
+ Hits 75564 78795 +3231
- Misses 18530 18754 +224
- Partials 5782 5983 +201 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Source-Branch: features/F-larksuite-cli-document-context Source-Commit: 9b8bafe Source-Subject: feat: parse document context meeting events Repo: larksuite-cli Synced-By: bytedance Timestamp: 20260803_095353Z
83bc48e to
94ad66b
Compare
Source-Branch: features/F-larksuite-cli-document-context Source-Commit: 94ad66b Source-Subject: test: assert ndjson section path semantically Repo: larksuite-cli Synced-By: bytedance Timestamp: 20260803_124142Z
991726d to
601c5ec
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
shortcuts/vc/vc_meeting_events_test.go (1)
1386-1393: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd table cases for the two uncovered comment-focus branches.
describeCommentFocushas four description branches. The table covers onlyfocused=truewith acomment_idand, in a later test,focused=falsewith acomment_id. It does not coverfocused=truewithout acomment_id("聚焦评论") orfocused=falsewithout acomment_id("取消评论聚焦"). Codecov reports lines 917-918 and 921-922 ofshortcuts/vc/vc_meeting_events.goas uncovered.The "取消评论聚焦" string also drives its own prefix in
needsColonat line 1277, which no test asserts.💚 Proposed additional table cases
{ name: "comment focus without actor", item: map[string]interface{}{ "comment_focus": map[string]interface{}{"comment_id": "comment-no-actor", "focused": true}, }, wantDescription: "聚焦评论 comment-no-actor", }, + { + name: "comment focus without comment id", + item: map[string]interface{}{ + "operator": map[string]interface{}{"id": "u-focus", "user_name": "Focuser"}, + "comment_focus": map[string]interface{}{"focused": true}, + }, + wantActorID: "u-focus", + wantDescription: "聚焦评论", + }, + { + name: "comment unfocus without comment id", + item: map[string]interface{}{ + "operator": map[string]interface{}{"id": "u-unfocus", "user_name": "Unfocuser"}, + "comment_focus": map[string]interface{}{"focused": false}, + }, + wantActorID: "u-unfocus", + wantDescription: "取消评论聚焦", + }, }Also add
{description: "取消评论聚焦", want: false}toTestNeedsColon.Based on coding guidelines: "Every behavior change must have an accompanying test, and contract tests must assert the changed field or behavior directly so reverting the implementation causes failure."
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@shortcuts/vc/vc_meeting_events_test.go` around lines 1386 - 1393, Extend the table-driven tests for describeCommentFocus with cases for focused=true without comment_id and focused=false without comment_id, asserting “聚焦评论” and “取消评论聚焦” respectively. Update TestNeedsColon to include {description: "取消评论聚焦", want: false}, ensuring the uncovered description branch and its prefix behavior are asserted directly.Sources: Coding guidelines, Linters/SAST tools
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@shortcuts/vc/vc_meeting_events.go`:
- Around line 924-927: Remove the item-level share_doc.title handling from the
details construction near the existing details append, so document title and URL
display come exclusively from the magic_share_started mapping for the matching
share_id. Keep item.share_doc only in the raw payload and preserve unrelated
detail generation.
---
Nitpick comments:
In `@shortcuts/vc/vc_meeting_events_test.go`:
- Around line 1386-1393: Extend the table-driven tests for describeCommentFocus
with cases for focused=true without comment_id and focused=false without
comment_id, asserting “聚焦评论” and “取消评论聚焦” respectively. Update TestNeedsColon to
include {description: "取消评论聚焦", want: false}, ensuring the uncovered description
branch and its prefix behavior are asserted directly.
🪄 Autofix
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 Plus
Run ID: ae224b9b-2ed0-41e4-a053-27493d56db26
📒 Files selected for processing (4)
shortcuts/vc/vc_meeting_events.goshortcuts/vc/vc_meeting_events_test.goskills/lark-vc-agent/SKILL.mdskills/lark-vc-agent/references/lark-vc-agent-meeting-events.md
🚀 PR Preview Install Guide🧰 CLI updatenpm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@e96cbe3fa77d250adc7058ac477c0a9e359b941c🧩 Skill updatenpx skills add larksuite/cli#features/F-larksuite-cli-document-context -y -g |
价值
让 Agent 能将会中的
document_context_changed事件转化为可执行的文档上下文:识别当前聚焦的评论、章节位置,以及图片或白板预览,再按事件中携带的标识调用文档评论或素材能力获取详情。改动
vc +meeting-events中解析document_context_changed,覆盖:comment_focus)section_location)element_preview)payload与既有会议事件输出契约;新增内容仅作为该事件的结构化解析结果。lark-vc-agentSkill,说明评论分页查询、评论 ID 匹配,以及图片/白板预览的后续获取路径。验证
Summary by CodeRabbit
New Features
Documentation