feat(im): add hidden +search-chat alias for chat search#1685
Conversation
📝 WalkthroughWalkthroughAdds Search-chat alias and tests
ChangesSearch-chat alias implementation, tests, and skill guidance
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 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@eb622387dd42a0128c25d3bb946edeb0f4490366🧩 Skill updatenpx skills add yballul-bytedance/cli#auto-research-sync/01KW9H34E533DQ0JK5PEEETR95/mr-758-97846aef -y -g |
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/SKILL.md`:
- Line 22: The table row for the group creation command uses a literal pipe in
the `--as user|bot` option, which breaks the markdown table structure. Update
the `skills/lark-im/SKILL.md` entry to avoid the unescaped pipe in that cell,
either by escaping it as `user\|bot` or rewording it to `user or bot`, so the
3-column table renders correctly.
🪄 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: f56ed5d3-68b4-44f3-9e0f-57240cc93313
📒 Files selected for processing (6)
shortcuts/im/helpers_test.goshortcuts/im/im_chat_search.goshortcuts/im/im_chat_search_test.goshortcuts/im/shortcuts.goskills/lark-im/SKILL.mdtests/cli_e2e/im/chat_search_alias_dryrun_test.go
cf4d2ee to
eb62238
Compare
There was a problem hiding this comment.
♻️ Duplicate comments (1)
skills/lark-im/SKILL.md (1)
22-22: 🎯 Functional Correctness | 🔴 Critical | ⚡ Quick winEscape the pipe character in the table cell.
The
user|botsyntax contains a literal|that markdown parsers interpret as a column delimiter, breaking the 3-column table. This causes the fourth column to be silently dropped in rendered output.Reword to avoid the pipe, or escape it as
user\|botor useuser or bot.🛠️ Proposed fix
- | Create a group | `lark-cli im +chat-create --as user|bot --name "<name>" ... --format json` | Raw `im chats create` unless shortcut flags cannot express the request | + | Create a group | `lark-cli im +chat-create --as user\|bot --name "<name>" ... --format json` | Raw `im chats create` unless shortcut flags cannot express the request |🤖 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 `@skills/lark-im/SKILL.md` at line 22, The markdown table entry in SKILL.md contains a literal pipe in the `--as user|bot` text, which breaks the 3-column table. Update the `Create a group` row so the `user|bot` option is either escaped as `user\|bot` or rewritten as `user or bot`, keeping the content within the existing table cell; this is the only change needed in the affected table row.
🤖 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.
Duplicate comments:
In `@skills/lark-im/SKILL.md`:
- Line 22: The markdown table entry in SKILL.md contains a literal pipe in the
`--as user|bot` text, which breaks the 3-column table. Update the `Create a
group` row so the `user|bot` option is either escaped as `user\|bot` or
rewritten as `user or bot`, keeping the content within the existing table cell;
this is the only change needed in the affected table row.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 58bc8b35-8213-4fe3-bb15-056f804fd180
📒 Files selected for processing (6)
shortcuts/im/helpers_test.goshortcuts/im/im_chat_search.goshortcuts/im/im_chat_search_test.goshortcuts/im/shortcuts.goskills/lark-im/SKILL.mdtests/cli_e2e/im/chat_search_alias_dryrun_test.go
✅ Files skipped from review due to trivial changes (1)
- shortcuts/im/helpers_test.go
🚧 Files skipped from review as they are similar to previous changes (4)
- tests/cli_e2e/im/chat_search_alias_dryrun_test.go
- shortcuts/im/shortcuts.go
- shortcuts/im/im_chat_search_test.go
- shortcuts/im/im_chat_search.go
Summary
Add a hidden compatibility alias for IM chat search so verb-first routing can still reach the canonical
+chat-searchshortcut.Changes
+search-chatas a hidden shortcut alias that reuses the existing+chat-searchbehavior.Test Plan
git diff --checkLARK_CLI_BIN=./lark-cli go test ./shortcuts/im -run 'Test(SearchChatAliasParity|Shortcuts)$'LARK_CLI_BIN=./lark-cli go test ./tests/cli_e2e/im -run 'TestIM_SearchChatAliasDryRun$'Related Issues
Auto research task: 01KW9H34E533DQ0JK5PEEETR95
Summary by CodeRabbit
New Features
+search-chat) as an alternative to the existing chat search command.Tests
Documentation