feat(vc): add meeting message send shortcut#1643
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
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 (7)
💤 Files with no reviewable changes (7)
📝 WalkthroughWalkthroughAdds a new ChangesVCMeetingMessageSend Shortcut
Estimated code review effort: 3 (Moderate) | ~20 minutes Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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_message_send_test.go`:
- Around line 91-116: The validation tests in VCMeetingMessageSend only check
error text, so they can miss regressions in typed metadata. Update
TestMeetingMessageSendValidateRejectsMeetingNumber and
TestMeetingMessageSendValidateRejectsMissingEmojiType to assert the structured
error using VCMeetingMessageSend.Validate, errs.ProblemOf for category/subtype,
and errors.As into *errs.ValidationError to verify the annotated Param as
needed. Keep the existing failure expectations, but replace substring-only
checks with typed assertions that cover the problem metadata and flag parameter.
In `@shortcuts/vc/vc_meeting_message_send.go`:
- Around line 122-130: In the message validation logic for
meetingMessageTypeText and meetingMessageTypeReaction, add explicit
mutual-exclusion checks so an explicit --msg-type cannot be paired with the
opposite content flag. Update the switch in vc_meeting_message_send.go to reject
--msg-type text when emojiType is set and reject --msg-type reaction when text
is set, returning a validation error alongside the existing required-field
checks. Keep the behavior centered around the msgType, text, and emojiType
handling so conflicting inputs fail fast instead of silently dropping one value.
🪄 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: 0108da63-c240-4626-88e1-f6fb5799d9d7
📒 Files selected for processing (6)
shortcuts/vc/shortcuts.goshortcuts/vc/vc_meeting_events_test.goshortcuts/vc/vc_meeting_message_send.goshortcuts/vc/vc_meeting_message_send_test.goskills/lark-vc-agent/SKILL.mdskills/lark-vc-agent/references/lark-vc-agent-meeting-message-send.md
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1643 +/- ##
==========================================
+ Coverage 74.51% 74.52% +0.01%
==========================================
Files 850 851 +1
Lines 87070 87155 +85
==========================================
+ Hits 64879 64952 +73
- Misses 17223 17231 +8
- Partials 4968 4972 +4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
🚀 PR Preview Install Guide🧰 CLI updatenpm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@6d2d9352846781f8ceca143708b32fa5d4ee7c3d🧩 Skill updatenpx skills add larksuite/cli#features/vc-meeting-message-send-main -y -g |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
shortcuts/vc/vc_meeting_message_send_test.go (1)
131-170: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winAdd a validation test for an unknown
--msg-type.
resolveMeetingMessageTypealso rejects unsupported values withparam=--msg-type, but none of the new cases exercise that branch. That leaves one of this shortcut's new validation paths untested.Proposed test
+func TestMeetingMessageSendValidateRejectsUnknownMessageType(t *testing.T) { + runtime := newMeetingMessageSendRuntime() + mustSetMeetingMessageSendFlag(t, runtime, "meeting-id", "7651377260537433044") + mustSetMeetingMessageSendFlag(t, runtime, "msg-type", "gif") + + err := VCMeetingMessageSend.Validate(context.Background(), runtime) + assertMeetingMessageSendValidationError(t, err, "--msg-type") + if !strings.Contains(err.Error(), "--msg-type must be text or reaction") { + t.Fatalf("error = %v, want invalid --msg-type", err) + } +}As per coding guidelines, “Every behavior change needs a test alongside the change.” Based on
shortcuts/vc/vc_meeting_message_send.go:106-141, unknown--msg-typevalues are a separate validation path.🤖 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_message_send_test.go` around lines 131 - 170, Add a validation test in vc_meeting_message_send_test.go that covers an unsupported --msg-type value through VCMeetingMessageSend.Validate and verifies the error path from resolveMeetingMessageType. Use newMeetingMessageSendRuntime and mustSetMeetingMessageSendFlag to set meeting-id and an invalid msg-type, then assert the validation error references param=--msg-type and includes the unsupported-value message. This should complement the existing missing/conflicting emoji/text tests by exercising the unknown msg-type branch in VCMeetingMessageSend.Validate.Source: Coding guidelines
🤖 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.
Outside diff comments:
In `@shortcuts/vc/vc_meeting_message_send_test.go`:
- Around line 131-170: Add a validation test in vc_meeting_message_send_test.go
that covers an unsupported --msg-type value through
VCMeetingMessageSend.Validate and verifies the error path from
resolveMeetingMessageType. Use newMeetingMessageSendRuntime and
mustSetMeetingMessageSendFlag to set meeting-id and an invalid msg-type, then
assert the validation error references param=--msg-type and includes the
unsupported-value message. This should complement the existing
missing/conflicting emoji/text tests by exercising the unknown msg-type branch
in VCMeetingMessageSend.Validate.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 3e278795-cd81-4710-9763-96718bbc155f
📒 Files selected for processing (2)
shortcuts/vc/vc_meeting_message_send.goshortcuts/vc/vc_meeting_message_send_test.go
🚧 Files skipped from review as they are similar to previous changes (1)
- shortcuts/vc/vc_meeting_message_send.go
93882b1 to
6d2d935
Compare
Summary
vc +meeting-message-sendshortcut for sending text and reaction messages in meetings.lark-vc-agentguidance for meeting message sending and emoji usage.Tests
go test ./shortcuts/vcgo test ./shortcuts/...Summary by CodeRabbit
+meeting-message-sendVC shortcut to send in-meeting text messages or reaction emojis.--dry-run, input trimming/validation, and posts messages to the meeting message endpoint.lark-vc-agent“会中动作” guidance to include in-meeting messaging and reaction feedback, including identity and parameter rules.lark-cli vc +meeting-message-send, including request/body mapping.