mirror of
https://github.com/JimLiu/baoyu-skills.git
synced 2026-07-12 22:09:48 +08:00
fix(gemini-web): respect explicit profile config over auto-discovery
Skip existing Chrome auto-discovery when GEMINI_WEB_CHROME_PROFILE_DIR is explicitly set, to avoid binding to the wrong browser profile/account. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -265,7 +265,8 @@ export async function load_browser_cookies(domain_name: string = '', verbose: bo
|
||||
if (cached) return { chrome: cached };
|
||||
}
|
||||
|
||||
const existingCookies = await fetch_cookies_from_existing_chrome(30_000, verbose);
|
||||
const hasExplicitProfile = !!process.env.GEMINI_WEB_CHROME_PROFILE_DIR?.trim();
|
||||
const existingCookies = hasExplicitProfile ? null : await fetch_cookies_from_existing_chrome(30_000, verbose);
|
||||
if (existingCookies) {
|
||||
const filtered: CookieMap = {};
|
||||
for (const [key, value] of Object.entries(existingCookies)) {
|
||||
|
||||
Reference in New Issue
Block a user