mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-30 09:36:37 +00:00
feat(core): Remove legacy settings. (#17244)
This commit is contained in:
@@ -49,7 +49,6 @@ import {
|
||||
DEFAULT_GEMINI_EMBEDDING_MODEL,
|
||||
DEFAULT_GEMINI_FLASH_MODEL,
|
||||
DEFAULT_GEMINI_MODEL_AUTO,
|
||||
DEFAULT_THINKING_MODE,
|
||||
isPreviewModel,
|
||||
PREVIEW_GEMINI_MODEL,
|
||||
PREVIEW_GEMINI_MODEL_AUTO,
|
||||
@@ -144,14 +143,6 @@ export interface OutputSettings {
|
||||
format?: OutputFormat;
|
||||
}
|
||||
|
||||
export interface CodebaseInvestigatorSettings {
|
||||
enabled?: boolean;
|
||||
maxNumTurns?: number;
|
||||
maxTimeMinutes?: number;
|
||||
thinkingBudget?: number;
|
||||
model?: string;
|
||||
}
|
||||
|
||||
export interface ExtensionSetting {
|
||||
name: string;
|
||||
description: string;
|
||||
@@ -168,10 +159,6 @@ export interface ResolvedExtensionSetting {
|
||||
source?: string;
|
||||
}
|
||||
|
||||
export interface CliHelpAgentSettings {
|
||||
enabled?: boolean;
|
||||
}
|
||||
|
||||
export interface AgentRunConfig {
|
||||
maxTimeMinutes?: number;
|
||||
maxTurns?: number;
|
||||
@@ -368,8 +355,6 @@ export interface ConfigParameters {
|
||||
policyEngineConfig?: PolicyEngineConfig;
|
||||
output?: OutputSettings;
|
||||
disableModelRouterForAuth?: AuthType[];
|
||||
codebaseInvestigatorSettings?: CodebaseInvestigatorSettings;
|
||||
cliHelpAgentSettings?: CliHelpAgentSettings;
|
||||
continueOnFailedApiCall?: boolean;
|
||||
retryFetchErrors?: boolean;
|
||||
enableShellOutputEfficiency?: boolean;
|
||||
@@ -513,8 +498,6 @@ export class Config {
|
||||
private readonly messageBus: MessageBus;
|
||||
private readonly policyEngine: PolicyEngine;
|
||||
private readonly outputSettings: OutputSettings;
|
||||
private readonly codebaseInvestigatorSettings: CodebaseInvestigatorSettings;
|
||||
private readonly cliHelpAgentSettings: CliHelpAgentSettings;
|
||||
private readonly continueOnFailedApiCall: boolean;
|
||||
private readonly retryFetchErrors: boolean;
|
||||
private readonly enableShellOutputEfficiency: boolean;
|
||||
@@ -688,18 +671,6 @@ export class Config {
|
||||
this.enableHooks = params.enableHooks ?? true;
|
||||
this.disabledHooks = params.disabledHooks ?? [];
|
||||
|
||||
this.codebaseInvestigatorSettings = {
|
||||
enabled: params.codebaseInvestigatorSettings?.enabled ?? true,
|
||||
maxNumTurns: params.codebaseInvestigatorSettings?.maxNumTurns ?? 10,
|
||||
maxTimeMinutes: params.codebaseInvestigatorSettings?.maxTimeMinutes ?? 3,
|
||||
thinkingBudget:
|
||||
params.codebaseInvestigatorSettings?.thinkingBudget ??
|
||||
DEFAULT_THINKING_MODE,
|
||||
model: params.codebaseInvestigatorSettings?.model,
|
||||
};
|
||||
this.cliHelpAgentSettings = {
|
||||
enabled: params.cliHelpAgentSettings?.enabled ?? true,
|
||||
};
|
||||
this.continueOnFailedApiCall = params.continueOnFailedApiCall ?? true;
|
||||
this.enableShellOutputEfficiency =
|
||||
params.enableShellOutputEfficiency ?? true;
|
||||
@@ -1895,14 +1866,6 @@ export class Config {
|
||||
return this.enableHooksUI;
|
||||
}
|
||||
|
||||
getCodebaseInvestigatorSettings(): CodebaseInvestigatorSettings {
|
||||
return this.codebaseInvestigatorSettings;
|
||||
}
|
||||
|
||||
getCliHelpAgentSettings(): CliHelpAgentSettings {
|
||||
return this.cliHelpAgentSettings;
|
||||
}
|
||||
|
||||
async createToolRegistry(): Promise<ToolRegistry> {
|
||||
const registry = new ToolRegistry(this, this.messageBus);
|
||||
|
||||
@@ -1980,10 +1943,11 @@ export class Config {
|
||||
* Registers the DelegateToAgentTool if agents or related features are enabled.
|
||||
*/
|
||||
private registerDelegateToAgentTool(registry: ToolRegistry): void {
|
||||
const agentsOverrides = this.getAgentsSettings().overrides ?? {};
|
||||
if (
|
||||
this.isAgentsEnabled() ||
|
||||
this.getCodebaseInvestigatorSettings().enabled ||
|
||||
this.getCliHelpAgentSettings().enabled
|
||||
agentsOverrides['codebase_investigator']?.enabled !== false ||
|
||||
agentsOverrides['cli_help']?.enabled !== false
|
||||
) {
|
||||
// Check if the delegate tool itself is allowed (if allowedTools is set)
|
||||
const allowedTools = this.getAllowedTools();
|
||||
|
||||
Reference in New Issue
Block a user