feat: adjust agent timeout hint output conditions#1328
Conversation
|
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 (1)
📝 WalkthroughWalkthroughThis PR adjusts device-flow hint output behavior in ChangesDevice-flow agent timeout hint output
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 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@12e4f90fcbc678e033d7fa64964f96c87467bd25🧩 Skill updatenpx skills add larksuite/cli#feat/auth_hint_opt -y -g |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1328 +/- ##
==========================================
+ Coverage 71.42% 71.47% +0.05%
==========================================
Files 688 688
Lines 65384 65483 +99
==========================================
+ Hits 46703 46807 +104
+ Misses 15035 15031 -4
+ Partials 3646 3645 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Summary
Improve
auth loginoutput behavior so AI-agent-specific authorization guidance is shown only when it is useful for agent or non-interactive environments, while keeping the interactive terminal experience cleaner for human users.Changes
AgentTimeoutHintonly for non-TTY text login flows, while preservingagent_hintin JSON output for structured agent consumption.Test Plan
go test ./cmd/auth/ -run "TestAgentTimeoutHint|TestLogin" -count=1lark-cli auth login --domain calendarflow prints the authorization URL,AgentTimeoutHint, and diagnostic info in the current agent environment.Related Issues
Summary by CodeRabbit
auth logincommand for device flow. Hints are now displayed contextually: shown in non-interactive (piped) environments and in JSON output, while suppressed in interactive terminal sessions for cleaner output.