File tree Expand file tree Collapse file tree 2 files changed +14
-13
lines changed Expand file tree Collapse file tree 2 files changed +14
-13
lines changed Original file line number Diff line number Diff line change 4
4
* SPDX-License-Identifier: Apache-2.0
5
5
*/
6
6
7
- import { type Config } from '@google/gemini-cli-core' ;
7
+ import {
8
+ IdeClient ,
9
+ IdeConnectionEvent ,
10
+ IdeConnectionType ,
11
+ logIdeConnection ,
12
+ type Config ,
13
+ } from '@google/gemini-cli-core' ;
8
14
import { type LoadedSettings } from '../config/settings.js' ;
9
15
import { performInitialAuth } from './auth.js' ;
10
16
import { validateTheme } from './theme.js' ;
@@ -36,6 +42,12 @@ export async function initializeApp(
36
42
const shouldOpenAuthDialog =
37
43
settings . merged . security ?. auth ?. selectedType === undefined || ! ! authError ;
38
44
45
+ if ( config . getIdeMode ( ) ) {
46
+ const ideClient = await IdeClient . getInstance ( ) ;
47
+ await ideClient . connect ( ) ;
48
+ logIdeConnection ( config , new IdeConnectionEvent ( IdeConnectionType . START ) ) ;
49
+ }
50
+
39
51
return {
40
52
authError,
41
53
themeError,
Original file line number Diff line number Diff line change @@ -48,20 +48,14 @@ import {
48
48
} from './models.js' ;
49
49
import { shouldAttemptBrowserLaunch } from '../utils/browser.js' ;
50
50
import type { MCPOAuthConfig } from '../mcp/oauth-provider.js' ;
51
- import { IdeClient } from '../ide/ide-client.js' ;
52
51
import { ideContextStore } from '../ide/ideContext.js' ;
53
52
import type { FileSystemService } from '../services/fileSystemService.js' ;
54
53
import { StandardFileSystemService } from '../services/fileSystemService.js' ;
55
54
import {
56
55
logCliConfiguration ,
57
- logIdeConnection ,
58
56
logRipgrepFallback ,
59
57
} from '../telemetry/loggers.js' ;
60
- import {
61
- IdeConnectionEvent ,
62
- IdeConnectionType ,
63
- RipgrepFallbackEvent ,
64
- } from '../telemetry/types.js' ;
58
+ import { RipgrepFallbackEvent } from '../telemetry/types.js' ;
65
59
import type { FallbackModelHandler } from '../fallback/types.js' ;
66
60
import { ModelRouterService } from '../routing/modelRouterService.js' ;
67
61
import { OutputFormat } from '../output/types.js' ;
@@ -439,11 +433,6 @@ export class Config {
439
433
}
440
434
this . initialized = true ;
441
435
442
- if ( this . getIdeMode ( ) ) {
443
- await ( await IdeClient . getInstance ( ) ) . connect ( ) ;
444
- logIdeConnection ( this , new IdeConnectionEvent ( IdeConnectionType . START ) ) ;
445
- }
446
-
447
436
// Initialize centralized FileDiscoveryService
448
437
this . getFileService ( ) ;
449
438
if ( this . getCheckpointingEnabled ( ) ) {
You can’t perform that action at this time.
0 commit comments