Enable & disable agents (#16225)

This commit is contained in:
Sehoon Shon
2026-01-14 19:30:17 -05:00
committed by GitHub
parent 42c26d1e1b
commit 4b2e9f7954
9 changed files with 800 additions and 13 deletions
+15 -1
View File
@@ -387,6 +387,7 @@ export interface ConfigParameters {
onReload?: () => Promise<{
disabledSkills?: string[];
adminSkillsEnabled?: boolean;
agents?: AgentSettings;
}>;
}
@@ -518,11 +519,12 @@ export class Config {
| (() => Promise<{
disabledSkills?: string[];
adminSkillsEnabled?: boolean;
agents?: AgentSettings;
}>)
| undefined;
private readonly enableAgents: boolean;
private readonly agents: AgentSettings;
private agents: AgentSettings;
private readonly skillsSupport: boolean;
private disabledSkills: string[];
private readonly adminSkillsEnabled: boolean;
@@ -1634,6 +1636,18 @@ export class Config {
await this.updateSystemInstructionIfInitialized();
}
/**
* Reloads agent settings.
*/
async reloadAgents(): Promise<void> {
if (this.onReload) {
const refreshed = await this.onReload();
if (refreshed.agents) {
this.agents = refreshed.agents;
}
}
}
isInteractive(): boolean {
return this.interactive;
}