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:
parent
b7bcc8c094
commit
bd01c370c9
|
|
@ -265,7 +265,8 @@ export async function load_browser_cookies(domain_name: string = '', verbose: bo
|
||||||
if (cached) return { chrome: cached };
|
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) {
|
if (existingCookies) {
|
||||||
const filtered: CookieMap = {};
|
const filtered: CookieMap = {};
|
||||||
for (const [key, value] of Object.entries(existingCookies)) {
|
for (const [key, value] of Object.entries(existingCookies)) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue