feat: update login hint and split-flow docs#1201
Conversation
📝 WalkthroughWalkthroughThe PR updates the device-code authentication flow's ChangesDevice-code auth hint guidance
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1201 +/- ##
=======================================
Coverage 69.14% 69.14%
=======================================
Files 630 630
Lines 59304 59310 +6
=======================================
+ Hits 41005 41011 +6
Misses 14988 14988
Partials 3311 3311 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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 `@cmd/auth/login.go`:
- Around line 282-288: The concatenated "hint" string in the auth login flow is
missing spaces/newlines between adjacent string literals causing run-on text
(e.g., between "...requests it." and "**CRITICAL:..."); update the construction
of the "hint" value so each concatenated piece ends or begins with an explicit
space or newline (or join using a single formatted multi-line string) so
sentences are separated and readable; locate the "hint" assignment in
cmd/auth/login.go and modify the string pieces (the "hint" key value) to include
appropriate spaces/newlines between sections.
🪄 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: 937bd2d6-8f4f-444f-b830-59072842206c
📒 Files selected for processing (3)
cmd/auth/login.gocmd/auth/login_test.goskills/lark-shared/SKILL.md
🚀 PR Preview Install Guide🧰 CLI updatenpm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@114b2e5d410eb142a27dbad33377d9b351a72baa🧩 Skill updatenpx skills add larksuite/cli#feat/auth_hint_opt -y -g |
Summary
Improve the AI agent hint in
lark-cli auth login --no-wait --jsonoutput and add Split-Flow device-code authorization documentation, ensuring AI agents correctly handle multi-turn device-code login scenarios.Changes
hintfield in--no-wait --jsonJSON output with the following new guidance:lark-cli auth login --device-code <device_code>itself, not instruct the user to do soverification_urlordevice_code— always re-runlark-cli auth login --no-wait --jsonfresh--device-codeto complete login--device-codein the same turn, never cache credentialsTest Plan
cmd/auth/login_test.goassertions updated)lark-cli auth login --no-wait --jsonflow works as expectedRelated Issues
Summary by CodeRabbit
Bug Fixes
auth login --no-waitJSON response format with clearer instructions and placeholder values to prevent caching and reuse errors.Documentation