Initialize MCP tools once at start up instead of every time we auth. (#3483)

This commit is contained in:
Tommaso Sciortino
2025-07-07 15:01:59 -07:00
committed by GitHub
parent aa10ccba71
commit 357546a2aa
8 changed files with 76 additions and 99 deletions

View File

@@ -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) {