Start IDE connection after config initialization (#6018)
This commit is contained in:
parent
94b6199943
commit
c7fd4c4a96
|
@ -34,6 +34,9 @@ import {
|
||||||
logUserPrompt,
|
logUserPrompt,
|
||||||
AuthType,
|
AuthType,
|
||||||
getOauthClient,
|
getOauthClient,
|
||||||
|
logIdeConnection,
|
||||||
|
IdeConnectionEvent,
|
||||||
|
IdeConnectionType,
|
||||||
} from '@google/gemini-cli-core';
|
} from '@google/gemini-cli-core';
|
||||||
import { validateAuthMethod } from './config/auth.js';
|
import { validateAuthMethod } from './config/auth.js';
|
||||||
import { setMaxSizedBoxDebugging } from './ui/components/shared/MaxSizedBox.js';
|
import { setMaxSizedBoxDebugging } from './ui/components/shared/MaxSizedBox.js';
|
||||||
|
@ -188,6 +191,11 @@ export async function main() {
|
||||||
|
|
||||||
await config.initialize();
|
await config.initialize();
|
||||||
|
|
||||||
|
if (config.getIdeMode() && config.getIdeModeFeature()) {
|
||||||
|
await config.getIdeClient().connect();
|
||||||
|
logIdeConnection(config, new IdeConnectionEvent(IdeConnectionType.START));
|
||||||
|
}
|
||||||
|
|
||||||
// Load custom themes from settings
|
// Load custom themes from settings
|
||||||
themeManager.loadCustomThemes(settings.merged.customThemes);
|
themeManager.loadCustomThemes(settings.merged.customThemes);
|
||||||
|
|
||||||
|
|
|
@ -10,3 +10,8 @@ export {
|
||||||
DEFAULT_GEMINI_FLASH_MODEL,
|
DEFAULT_GEMINI_FLASH_MODEL,
|
||||||
DEFAULT_GEMINI_EMBEDDING_MODEL,
|
DEFAULT_GEMINI_EMBEDDING_MODEL,
|
||||||
} from './src/config/models.js';
|
} from './src/config/models.js';
|
||||||
|
export { logIdeConnection } from './src/telemetry/loggers.js';
|
||||||
|
export {
|
||||||
|
IdeConnectionEvent,
|
||||||
|
IdeConnectionType,
|
||||||
|
} from './src/telemetry/types.js';
|
||||||
|
|
|
@ -322,10 +322,6 @@ export class Config {
|
||||||
this.folderTrust = params.folderTrust ?? false;
|
this.folderTrust = params.folderTrust ?? false;
|
||||||
this.ideMode = params.ideMode ?? false;
|
this.ideMode = params.ideMode ?? false;
|
||||||
this.ideClient = IdeClient.getInstance();
|
this.ideClient = IdeClient.getInstance();
|
||||||
if (this.ideMode && this.ideModeFeature) {
|
|
||||||
this.ideClient.connect();
|
|
||||||
logIdeConnection(this, new IdeConnectionEvent(IdeConnectionType.START));
|
|
||||||
}
|
|
||||||
this.loadMemoryFromIncludeDirectories =
|
this.loadMemoryFromIncludeDirectories =
|
||||||
params.loadMemoryFromIncludeDirectories ?? false;
|
params.loadMemoryFromIncludeDirectories ?? false;
|
||||||
this.chatCompression = params.chatCompression;
|
this.chatCompression = params.chatCompression;
|
||||||
|
|
Loading…
Reference in New Issue