Expose Codebase Investigator settings to the user (#10844)

This commit is contained in:
Silvio Junior
2025-10-13 22:30:32 -04:00
committed by GitHub
parent f56a561f02
commit 9185f68e52
8 changed files with 120 additions and 131 deletions
+27 -1
View File
@@ -33,7 +33,33 @@ export class AgentRegistry {
}
private loadBuiltInAgents(): void {
this.registerAgent(CodebaseInvestigatorAgent);
const investigatorSettings = this.config.getCodebaseInvestigatorSettings();
// Only register the agent if it's enabled in the settings.
if (investigatorSettings?.enabled) {
const agentDef = {
...CodebaseInvestigatorAgent,
modelConfig: {
...CodebaseInvestigatorAgent.modelConfig,
model:
investigatorSettings.model ??
CodebaseInvestigatorAgent.modelConfig.model,
thinkingBudget:
investigatorSettings.thinkingBudget ??
CodebaseInvestigatorAgent.modelConfig.thinkingBudget,
},
runConfig: {
...CodebaseInvestigatorAgent.runConfig,
max_time_minutes:
investigatorSettings.maxTimeMinutes ??
CodebaseInvestigatorAgent.runConfig.max_time_minutes,
max_turns:
investigatorSettings.maxNumTurns ??
CodebaseInvestigatorAgent.runConfig.max_turns,
},
};
this.registerAgent(agentDef);
}
}
/**