mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-29 14:34:55 -07:00
Enable & disable agents (#16225)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user