From 357546a2aac918702f6ebfa4a97bd95ccd614e5d Mon Sep 17 00:00:00 2001 From: Tommaso Sciortino Date: Mon, 7 Jul 2025 15:01:59 -0700 Subject: Initialize MCP tools once at start up instead of every time we auth. (#3483) --- packages/cli/src/gemini.tsx | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'packages/cli/src') diff --git a/packages/cli/src/gemini.tsx b/packages/cli/src/gemini.tsx index 11ae1505..39d3bbe3 100644 --- a/packages/cli/src/gemini.tsx +++ b/packages/cli/src/gemini.tsx @@ -115,15 +115,7 @@ export async function main() { setMaxSizedBoxDebugging(config.getDebugMode()); - // Initialize centralized FileDiscoveryService - config.getFileService(); - if (config.getCheckpointingEnabled()) { - try { - await config.getGitService(); - } catch { - // For now swallow the error, later log it. - } - } + await config.initialize(); if (settings.merged.theme) { if (!themeManager.setActiveTheme(settings.merged.theme)) { @@ -133,12 +125,11 @@ export async function main() { } } - const memoryArgs = settings.merged.autoConfigureMaxOldSpaceSize - ? getNodeMemoryArgs(config) - : []; - // hop into sandbox if we are outside and sandboxing is enabled if (!process.env.SANDBOX) { + const memoryArgs = settings.merged.autoConfigureMaxOldSpaceSize + ? getNodeMemoryArgs(config) + : []; const sandboxConfig = config.getSandbox(); if (sandboxConfig) { if (settings.merged.selectedAuthType) { -- cgit v1.2.3