mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-19 09:33:53 +00:00
Refactor the logic for deciding whether to launch a browser into config (#4622)
This commit is contained in:
committed by
GitHub
parent
97cf26ec53
commit
5066bc5384
@@ -26,7 +26,6 @@ import {
|
||||
clearCachedGoogleAccount,
|
||||
} from '../utils/user_account.js';
|
||||
import { AuthType } from '../core/contentGenerator.js';
|
||||
import { shouldAttemptBrowserLaunch } from '../utils/browser.js';
|
||||
import readline from 'node:readline';
|
||||
|
||||
// OAuth Client ID used to initiate OAuth2Client class.
|
||||
@@ -122,7 +121,7 @@ export async function getOauthClient(
|
||||
}
|
||||
}
|
||||
|
||||
if (config.getNoBrowser() || !shouldAttemptBrowserLaunch()) {
|
||||
if (config.isBrowserLaunchSuppressed()) {
|
||||
let success = false;
|
||||
const maxRetries = 2;
|
||||
for (let i = 0; !success && i < maxRetries; i++) {
|
||||
|
||||
Reference in New Issue
Block a user