Refactor in preparation for Reauth (#1196)

This commit is contained in:
Tommaso Sciortino
2025-06-18 16:34:00 -07:00
committed by GitHub
parent b96fbd913e
commit 8bc3b415c9
6 changed files with 128 additions and 98 deletions

View File

@@ -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();