Move IdeClient.connect() to initializeApp(). (#8282)

This commit is contained in:
Tommaso Sciortino
2025-09-11 13:07:57 -07:00
committed by GitHub
parent ad21c10988
commit 39af7115d1
7 changed files with 32 additions and 58 deletions
+1 -12
View File
@@ -48,20 +48,14 @@ import {
} from './models.js';
import { shouldAttemptBrowserLaunch } from '../utils/browser.js';
import type { MCPOAuthConfig } from '../mcp/oauth-provider.js';
import { IdeClient } from '../ide/ide-client.js';
import { ideContextStore } from '../ide/ideContext.js';
import type { FileSystemService } from '../services/fileSystemService.js';
import { StandardFileSystemService } from '../services/fileSystemService.js';
import {
logCliConfiguration,
logIdeConnection,
logRipgrepFallback,
} from '../telemetry/loggers.js';
import {
IdeConnectionEvent,
IdeConnectionType,
RipgrepFallbackEvent,
} from '../telemetry/types.js';
import { RipgrepFallbackEvent } from '../telemetry/types.js';
import type { FallbackModelHandler } from '../fallback/types.js';
import { ModelRouterService } from '../routing/modelRouterService.js';
import { OutputFormat } from '../output/types.js';
@@ -439,11 +433,6 @@ export class Config {
}
this.initialized = true;
if (this.getIdeMode()) {
await (await IdeClient.getInstance()).connect();
logIdeConnection(this, new IdeConnectionEvent(IdeConnectionType.START));
}
// Initialize centralized FileDiscoveryService
this.getFileService();
if (this.getCheckpointingEnabled()) {
-1
View File
@@ -51,7 +51,6 @@ export * from './utils/errorParsing.js';
export * from './utils/workspaceContext.js';
export * from './utils/ignorePatterns.js';
export * from './utils/partUtils.js';
export * from './utils/ide-trust.js';
export * from './utils/promptIdContext.js';
// Export services
-15
View File
@@ -1,15 +0,0 @@
/**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { ideContextStore } from '../ide/ideContext.js';
/**
* Gets the workspace trust from the IDE if available.
* @returns A boolean if the IDE provides a trust value, otherwise undefined.
*/
export function getIdeTrust(): boolean | undefined {
return ideContextStore.get()?.workspaceState?.isTrusted;
}