feat(yida-login): add --check-only and auto-select org#3
Merged
Conversation
- Add --check-only parameter to check login status without triggering login - Add auto-select org logic: if only 1 org, auto-select and complete login - Add can_auto_use field for AI Agent - Add human-readable message output Closes #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--check-onlyparameter to check login status without triggering login flowcan_auto_usefield for AI Agent to determine if login is availableChanges
skills/yida-login/scripts/login-interactive.py:check_login_only()function--check-onlyCLI argument supportstage2_get_org_list()to auto-select when only 1 orgUsage
Check login status
Returns:
{ "status": "ok", "can_auto_use": true, "csrf_token": "xxx", "corp_id": "dingxxx", "user_id": "195xxx", "base_url": "https://ding.aliwork.com", "message": "✅ 已有有效登录态,可直接使用" }Auto-select org
When user scans QR code and only 1 organization is detected, the login flow automatically completes without requiring user to reply with org number.
User Experience Improvement
Related Issue
Closes #2