mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-24 22:55:13 +00:00
feat: Add enableAgents experimental flag (#14371)
Co-authored-by: Abhi <43648792+abhipatel12@users.noreply.github.com>
This commit is contained in:
@@ -767,6 +767,11 @@ their corresponding top-level category object in your `settings.json` file.
|
||||
|
||||
#### `experimental`
|
||||
|
||||
- **`experimental.enableAgents`** (boolean):
|
||||
- **Description:** Enable local and remote subagents.
|
||||
- **Default:** `false`
|
||||
- **Requires restart:** Yes
|
||||
|
||||
- **`experimental.extensionManagement`** (boolean):
|
||||
- **Description:** Enable extension management features.
|
||||
- **Default:** `true`
|
||||
|
||||
@@ -639,6 +639,7 @@ export async function loadCliConfig(
|
||||
enabledExtensions: argv.extensions,
|
||||
extensionLoader: extensionManager,
|
||||
enableExtensionReloading: settings.experimental?.extensionReloading,
|
||||
enableAgents: settings.experimental?.enableAgents,
|
||||
enableModelAvailabilityService:
|
||||
settings.experimental?.isModelAvailabilityServiceEnabled,
|
||||
experimentalJitContext: settings.experimental?.jitContext,
|
||||
|
||||
@@ -346,6 +346,17 @@ describe('SettingsSchema', () => {
|
||||
).toBe('Enable preview features (e.g., preview models).');
|
||||
});
|
||||
|
||||
it('should have enableAgents setting in schema', () => {
|
||||
const setting = getSettingsSchema().experimental.properties.enableAgents;
|
||||
expect(setting).toBeDefined();
|
||||
expect(setting.type).toBe('boolean');
|
||||
expect(setting.category).toBe('Experimental');
|
||||
expect(setting.default).toBe(false);
|
||||
expect(setting.requiresRestart).toBe(true);
|
||||
expect(setting.showInDialog).toBe(false);
|
||||
expect(setting.description).toBe('Enable local and remote subagents.');
|
||||
});
|
||||
|
||||
it('should have isModelAvailabilityServiceEnabled setting in schema', () => {
|
||||
const setting =
|
||||
getSettingsSchema().experimental.properties
|
||||
|
||||
@@ -1285,6 +1285,15 @@ const SETTINGS_SCHEMA = {
|
||||
description: 'Setting to enable experimental features',
|
||||
showInDialog: false,
|
||||
properties: {
|
||||
enableAgents: {
|
||||
type: 'boolean',
|
||||
label: 'Enable Agents',
|
||||
category: 'Experimental',
|
||||
requiresRestart: true,
|
||||
default: false,
|
||||
description: 'Enable local and remote subagents.',
|
||||
showInDialog: false,
|
||||
},
|
||||
extensionManagement: {
|
||||
type: 'boolean',
|
||||
label: 'Extension Management',
|
||||
|
||||
@@ -320,6 +320,7 @@ export interface ConfigParameters {
|
||||
[K in HookEventName]?: HookDefinition[];
|
||||
} & { disabled?: string[] });
|
||||
previewFeatures?: boolean;
|
||||
enableAgents?: boolean;
|
||||
enableModelAvailabilityService?: boolean;
|
||||
experimentalJitContext?: boolean;
|
||||
}
|
||||
@@ -441,6 +442,7 @@ export class Config {
|
||||
private previewModelFallbackMode = false;
|
||||
private previewModelBypassMode = false;
|
||||
private readonly enableModelAvailabilityService: boolean;
|
||||
private readonly enableAgents: boolean;
|
||||
|
||||
private readonly experimentalJitContext: boolean;
|
||||
private contextManager?: ContextManager;
|
||||
@@ -504,6 +506,7 @@ export class Config {
|
||||
this.model = params.model;
|
||||
this.enableModelAvailabilityService =
|
||||
params.enableModelAvailabilityService ?? false;
|
||||
this.enableAgents = params.enableAgents ?? false;
|
||||
this.experimentalJitContext = params.experimentalJitContext ?? false;
|
||||
this.modelAvailabilityService = new ModelAvailabilityService();
|
||||
this.previewFeatures = params.previewFeatures ?? undefined;
|
||||
@@ -1211,6 +1214,10 @@ export class Config {
|
||||
return this.enableModelAvailabilityService;
|
||||
}
|
||||
|
||||
isAgentsEnabled(): boolean {
|
||||
return this.enableAgents;
|
||||
}
|
||||
|
||||
getNoBrowser(): boolean {
|
||||
return this.noBrowser;
|
||||
}
|
||||
|
||||
@@ -1258,6 +1258,13 @@
|
||||
"default": {},
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"enableAgents": {
|
||||
"title": "Enable Agents",
|
||||
"description": "Enable local and remote subagents.",
|
||||
"markdownDescription": "Enable local and remote subagents.\n\n- Category: `Experimental`\n- Requires restart: `yes`\n- Default: `false`",
|
||||
"default": false,
|
||||
"type": "boolean"
|
||||
},
|
||||
"extensionManagement": {
|
||||
"title": "Extension Management",
|
||||
"description": "Enable extension management features.",
|
||||
|
||||
Reference in New Issue
Block a user