mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-12 23:21:27 -07:00
(fix): Enable Codebase Investigator for all modes (#11259)
This commit is contained in:
@@ -46,6 +46,8 @@ import { StartSessionEvent } from '../telemetry/index.js';
|
|||||||
import {
|
import {
|
||||||
DEFAULT_GEMINI_EMBEDDING_MODEL,
|
DEFAULT_GEMINI_EMBEDDING_MODEL,
|
||||||
DEFAULT_GEMINI_FLASH_MODEL,
|
DEFAULT_GEMINI_FLASH_MODEL,
|
||||||
|
DEFAULT_GEMINI_MODEL,
|
||||||
|
DEFAULT_THINKING_MODE,
|
||||||
} from './models.js';
|
} from './models.js';
|
||||||
import { shouldAttemptBrowserLaunch } from '../utils/browser.js';
|
import { shouldAttemptBrowserLaunch } from '../utils/browser.js';
|
||||||
import type { MCPOAuthConfig } from '../mcp/oauth-provider.js';
|
import type { MCPOAuthConfig } from '../mcp/oauth-provider.js';
|
||||||
@@ -371,7 +373,7 @@ export class Config {
|
|||||||
private readonly outputSettings: OutputSettings;
|
private readonly outputSettings: OutputSettings;
|
||||||
private readonly useModelRouter: boolean;
|
private readonly useModelRouter: boolean;
|
||||||
private readonly enableMessageBusIntegration: boolean;
|
private readonly enableMessageBusIntegration: boolean;
|
||||||
private readonly codebaseInvestigatorSettings?: CodebaseInvestigatorSettings;
|
private readonly codebaseInvestigatorSettings: CodebaseInvestigatorSettings;
|
||||||
private readonly continueOnFailedApiCall: boolean;
|
private readonly continueOnFailedApiCall: boolean;
|
||||||
private readonly retryFetchErrors: boolean;
|
private readonly retryFetchErrors: boolean;
|
||||||
private readonly enableShellOutputEfficiency: boolean;
|
private readonly enableShellOutputEfficiency: boolean;
|
||||||
@@ -467,7 +469,15 @@ export class Config {
|
|||||||
this.useModelRouter = params.useModelRouter ?? false;
|
this.useModelRouter = params.useModelRouter ?? false;
|
||||||
this.enableMessageBusIntegration =
|
this.enableMessageBusIntegration =
|
||||||
params.enableMessageBusIntegration ?? false;
|
params.enableMessageBusIntegration ?? false;
|
||||||
this.codebaseInvestigatorSettings = params.codebaseInvestigatorSettings;
|
this.codebaseInvestigatorSettings = {
|
||||||
|
enabled: params.codebaseInvestigatorSettings?.enabled ?? true,
|
||||||
|
maxNumTurns: params.codebaseInvestigatorSettings?.maxNumTurns ?? 15,
|
||||||
|
maxTimeMinutes: params.codebaseInvestigatorSettings?.maxTimeMinutes ?? 5,
|
||||||
|
thinkingBudget:
|
||||||
|
params.codebaseInvestigatorSettings?.thinkingBudget ??
|
||||||
|
DEFAULT_THINKING_MODE,
|
||||||
|
model: params.codebaseInvestigatorSettings?.model ?? DEFAULT_GEMINI_MODEL,
|
||||||
|
};
|
||||||
this.continueOnFailedApiCall = params.continueOnFailedApiCall ?? true;
|
this.continueOnFailedApiCall = params.continueOnFailedApiCall ?? true;
|
||||||
this.enableShellOutputEfficiency =
|
this.enableShellOutputEfficiency =
|
||||||
params.enableShellOutputEfficiency ?? true;
|
params.enableShellOutputEfficiency ?? true;
|
||||||
@@ -1062,7 +1072,7 @@ export class Config {
|
|||||||
return this.enableMessageBusIntegration;
|
return this.enableMessageBusIntegration;
|
||||||
}
|
}
|
||||||
|
|
||||||
getCodebaseInvestigatorSettings(): CodebaseInvestigatorSettings | undefined {
|
getCodebaseInvestigatorSettings(): CodebaseInvestigatorSettings {
|
||||||
return this.codebaseInvestigatorSettings;
|
return this.codebaseInvestigatorSettings;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1158,7 +1168,7 @@ export class Config {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Register Subagents as Tools
|
// Register Subagents as Tools
|
||||||
if (this.getCodebaseInvestigatorSettings()?.enabled) {
|
if (this.getCodebaseInvestigatorSettings().enabled) {
|
||||||
const definition = this.agentRegistry.getDefinition(
|
const definition = this.agentRegistry.getDefinition(
|
||||||
'codebase_investigator',
|
'codebase_investigator',
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user