docs(im): explain querying topic replies by time - #2113
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:
📝 WalkthroughWalkthroughUpdated the Lark IM chat message-list reference with native topic time-range semantics, raw Messages API examples for retrieving replies by creation time, pagination instructions, output limitations, and corresponding AI usage guidance. ChangesTopic chat time ranges
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related issues
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ 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 |
🚀 PR Preview Install Guide🧰 CLI updatenpm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@5a33f3de356750d30edaf35fd978ab275f06fdbc🧩 Skill updatenpx skills add YangJunzhou-01/cli#feat/flat-thread-replies -y -g |
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 `@skills/lark-im/references/lark-im-chat-messages-list.md`:
- Line 52: Update the pagination example in the chat messages list documentation
to repeat --include-thread-replies alongside --page-token when demonstrating
flat-mode pagination. Ensure the example preserves
only_thread_root_messages=false across subsequent requests instead of reverting
to root-only results.
In `@tests/cli_e2e/im/chat_messages_include_thread_replies_workflow_test.go`:
- Around line 28-41: Add verified teardown for the chat created in the setup
flow around chatID extraction: after obtaining and using chatID, invoke the
existing chat-delete CLI workflow with the bot credentials and assert the
command succeeds and exits successfully. Ensure cleanup runs even when the test
fails by registering it with the test’s teardown mechanism, preserving the
self-contained create/use/cleanup lifecycle.
🪄 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 Plus
Run ID: a75b530d-1db3-4656-9b50-129154801306
📒 Files selected for processing (9)
shortcuts/im/im_chat_messages_list.goshortcuts/im/im_chat_messages_list_test.goskill-template/domains/im.mdskills/lark-im/SKILL.mdskills/lark-im/references/lark-im-chat-messages-list.mdskills/lark-im/references/lark-im-message-enrichment.mdtests/cli_e2e/im/chat_messages_include_thread_replies_dryrun_test.gotests/cli_e2e/im/chat_messages_include_thread_replies_workflow_test.gotests/cli_e2e/im/coverage.md
3594697 to
11e4add
Compare
11e4add to
8378dd0
Compare
01f8706 to
8976d59
Compare
8976d59 to
5a33f3d
Compare
Summary
Document the time-range behavior of
im +chat-messages-listfor native topic chats and provide a raw API workaround for querying replies by their own creation times.This PR does not change existing CLI behavior.
Changes
+chat-messages-listusesonly_thread_root_messages=trueand expands replies under the returned roots.chat_mode=topic), an empty time-window result does not mean no new replies were posted.only_thread_root_messages=falseto query topic roots and replies as a flat, server-paginated list.chat_mode=group,group_message_type=thread).Test Plan
go test ./shortcuts/imgit diff --checkonly_thread_root_messages=falsereturns replies by their own creation times in a native topic chat.Related Issues
Summary by CodeRabbit