perf(startup): build the local tool environment in the background and gate its consumers

Runtime creation, MCP launches, Obsidian, native clients and the tool-environment IPC await the initialization promise instead of startup awaiting it before the window path. A failure still fails startup with the same diagnostic.
This commit is contained in:
mesalogo
2026-10-03 16:56:13 +08:00
parent b28ddd4ba8
commit 68cc0792e1
11 changed files with 149 additions and 19 deletions
+1 -1
View File
@@ -9270,7 +9270,7 @@ describe('registerIpcHandlers agent terminal state', () => {
coordinator = new NativeClientCoordinator({ database, settingsStore,
applicationSettingsStore,
capabilities, executionSpaceResolver: new ExecutionSpaceResolver(), terminalManager,
localEnvironment: { launchEnvironmentProvider: () => process.env } as never,
localEnvironment: { launchEnvironmentProvider: () => process.env, whenReady: async () => undefined } as never,
rootDirectory: join(root, 'clients'), managedNodeDirectory: join(root, 'node'),
bundledRuntimePaths: resolveBundledRuntimePaths({ appPath: process.cwd(), resourcesPath: '', packaged: false }),
npmCliPath: resolveNpmCliPaths({ appPath: process.cwd(), resourcesPath: '', packaged: false }).npmCliPath,