From 8bc3b415c973794654d64d434949a93fb3239acb Mon Sep 17 00:00:00 2001 From: Tommaso Sciortino Date: Wed, 18 Jun 2025 16:34:00 -0700 Subject: Refactor in preparation for Reauth (#1196) --- packages/cli/src/gemini.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'packages/cli') diff --git a/packages/cli/src/gemini.tsx b/packages/cli/src/gemini.tsx index d87a8a6a..5b5bfa67 100644 --- a/packages/cli/src/gemini.tsx +++ b/packages/cli/src/gemini.tsx @@ -47,6 +47,10 @@ export async function main() { const extensions = loadExtensions(workspaceRoot); const config = await loadCliConfig(settings.merged, extensions, sessionId); + // When using Code Assist this triggers the Oauth login. + // Do this now, before sandboxing, so web redirect works. + await config.getGeminiClient().initialize(); + // Initialize centralized FileDiscoveryService config.getFileService(); if (config.getCheckpointEnabled()) { @@ -65,10 +69,6 @@ export async function main() { } } - // When using Code Assist this triggers the Oauth login. - // Do this now, before sandboxing, so web redirect works. - await config.getGeminiClient().getChat(); - // hop into sandbox if we are outside and sandboxing is enabled if (!process.env.SANDBOX) { const sandboxConfig = config.getSandbox(); -- cgit v1.2.3