docs(drive): document 30-char query limit for +search - #1560
Conversation
The Search v2 API rejects queries longer than 30 characters (counted by Unicode code point, CJK 1 each) with 99992402 field validation failed — it is a hard error, not truncation. Surface this in the --query -h help text and the lark-drive search skill so callers compress long queries before searching instead of hitting the error. Change-Id: Ieb30a66edae7a573690c49719627ec8fb2500a1a
|
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)
📝 WalkthroughWalkthroughThe Changesdrive +search --query length constraint
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Suggested labels
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 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 |
🚀 PR Preview Install Guide🧰 CLI updatenpm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@c39b2937e9804379b396c32232dd3bfc0e7e2410🧩 Skill updatenpx skills add larksuite/cli#docs/drive-search-query-30char-limit -y -g |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1560 +/- ##
=======================================
Coverage 74.04% 74.05%
=======================================
Files 787 788 +1
Lines 76353 76366 +13
=======================================
+ Hits 56534 56550 +16
+ Misses 15572 15570 -2
+ Partials 4247 4246 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
What
The Search v2 API behind
drive +searchrejects any--querylonger than 30 characters with99992402 field validation failed. Two important details that were undocumented:Verified behavior
a× 30a× 3199992402 field validation failed测× 29测× 30测× 3199992402 field validation failedBoundary is exactly 30 code points regardless of ASCII vs CJK.
Changes
shortcuts/drive/drive_search.go— add the limit to the--queryflag description so it shows indrive +search -h.skills/lark-drive/references/lark-drive-search.md— add the constraint to the key-constraints block and the--queryparameter table, with guidance to compress long queries into core entity + topic terms instead of pasting whole sentences.Docs/help-text only; no behavior change.
Summary by CodeRabbit
drive +searchand--queryguidance with a hard 30 Unicode code point limit.