fix(gemini-web): also respect BAOYU_CHROME_PROFILE_DIR in auto-discovery skip

Both GEMINI_WEB_CHROME_PROFILE_DIR and BAOYU_CHROME_PROFILE_DIR are
valid profile overrides (see resolveGeminiWebChromeProfileDir). Skip
existing Chrome auto-discovery when either is set.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Alec Jiang 2026-03-16 19:02:58 +08:00
parent bd01c370c9
commit 462d080a0e
1 changed files with 1 additions and 1 deletions

View File

@ -265,7 +265,7 @@ export async function load_browser_cookies(domain_name: string = '', verbose: bo
if (cached) return { chrome: cached };
}
const hasExplicitProfile = !!process.env.GEMINI_WEB_CHROME_PROFILE_DIR?.trim();
const hasExplicitProfile = !!(process.env.GEMINI_WEB_CHROME_PROFILE_DIR?.trim() || process.env.BAOYU_CHROME_PROFILE_DIR?.trim());
const existingCookies = hasExplicitProfile ? null : await fetch_cookies_from_existing_chrome(30_000, verbose);
if (existingCookies) {
const filtered: CookieMap = {};