docs(lark-im): document @mention format per message type (text/post/card) - #1419
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 (2)
💤 Files with no reviewable changes (2)
📝 WalkthroughWalkthroughTwo Lark IM reference documentation files ( ChangesLark IM
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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 |
9fcbca1 to
b7a63b4
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@skills/lark-im/references/lark-im-messages-reply.md`:
- Around line 242-247: The interactive card markup uses an incorrect multi-user
mention attribute (`ids=`); update the `<at>` tag examples in
lark-im-messages-reply.md so multi-user mentions use a single id attribute with
comma-separated values (e.g., change `<at ids=ou_xxx1,ou_xxx2></at>` to `<at
id=ou_xxx1,ou_xxx2></at>`), and ensure the single-user example remains `<at
id=ou_xxx></at>` and the email form remains `<at email=user@example.com></at>`
inside the lark_md/markdown card content.
🪄 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: ea7e90c4-910d-4384-9a7f-71eededd6755
📒 Files selected for processing (2)
skills/lark-im/references/lark-im-messages-reply.mdskills/lark-im/references/lark-im-messages-send.md
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1419 +/- ##
=======================================
Coverage 73.35% 73.35%
=======================================
Files 750 750
Lines 69250 69250
=======================================
Hits 50799 50799
Misses 14711 14711
Partials 3740 3740 ☔ 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@241c18c8ecf8054eadcb6e9c18dec46577a30510🧩 Skill updatenpx skills add sammi-bytedance/larksuite-cli#docs/im-card-mention-formats -y -g |
5601b65 to
f1e2c10
Compare
…ard) Split the send/reply @Mention sections by message type: - text: <at user_id="ou_xxx">name</at> (inner name optional), @ALL - post: inline form in text/md elements, or a dedicated {"tag":"at"} node - interactive card: card-native <at id=>, <at ids=>, <at email=>; note that the shortcut does NOT normalize card content (only text/post). Also apply gofmt -s to shortcuts/im/im_threads_messages_list.go to drop redundant []string composite-literal types flagged by golangci-lint. Change-Id: Ie407cc9d4d2f772856fc890bf8e801a4b88b8263
f1e2c10 to
241c18c
Compare
Rebased onto main v1.0.54, which added IM content after this branch forked. Fold main's new facts into the slimmed/gotcha-only form and fix drift: - SKILL.md: compact the newly-merged chat.user_setting / chat.managers / chat.moderation API resources to the api_compact `action`(identity) form (consistent with the rest; regen-equivalent), and note the opt-in `--download-resources` flag on the three message-pulling shortcuts. - chat-search: fix stale `--sort-by` -> `--sort`, add `--chat-modes`, and fold the "`--sort` is always descending" caution (#1302/#1317). - chat-messages-list: note `--order` is the only sort axis (no field sort). - messages-send: split @mention by message type; interactive cards are not normalized and need card-native `<at>` syntax (#1419). - flag-cancel: document best-effort double-cancel (feed layer skipped with a stderr warning when chat type is undeterminable). - feed-group-list-item / query-item: p2p cards omit chat_name; resolve via chats/batch_query -> p2p_target_id -> contact lookup. - message-enrichment: add the `--download-resources` contract (merge_forward container-id 234003 trap, fail-silent isolation, no extra scope) (#1245). Docs only; no Go/--help/Desc changes.
Summary
The
@Mention Formatsections of theim +messages-send/im +messages-replyreference docs only coveredtext/post. This documents the<at>syntax for each message type, including interactive cards, whose syntax differs and is not normalized by the shortcut.Changes
text:<at user_id="ou_xxx">name</at>(inner display name optional),@allviauser_id="all"; keep the note that the shortcut normalizesid=/open_id=intouser_id=.post: inline<at user_id=...>insidetext/mdelements, or a dedicated{"tag":"at","user_id":"ou_xxx"}element node.interactive(card): card-native syntax<at id=ou_xxx>, multi-user<at ids=ou_xxx1,ou_xxx2>, by-email<at email=...>; explicitly note card content is passed through verbatim (onlytext/postare normalized).Test Plan
normalizeAtMentionsruns only fortext/post(shortcuts/im/im_messages_send.go,im_messages_reply.go); interactive content is untouched.Related Issues
Summary by CodeRabbit
@mentionformat guidance to clarify syntax differences across message types: text, post, and interactive cards.@all, multiple users, and email-based mentions by message type.