mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-14 16:10:59 -07:00
feat(core, cli): Add support for agents in settings.json. (#16433)
This commit is contained in:
@@ -660,6 +660,7 @@ export async function loadCliConfig(
|
||||
mcpServers: mcpEnabled ? settings.mcpServers : {},
|
||||
mcpEnabled,
|
||||
extensionsEnabled,
|
||||
agents: settings.agents,
|
||||
allowedMcpServers: mcpEnabled
|
||||
? (argv.allowedMcpServerNames ?? settings.mcp?.allowed)
|
||||
: undefined,
|
||||
|
||||
@@ -785,6 +785,32 @@ const SETTINGS_SCHEMA = {
|
||||
},
|
||||
},
|
||||
|
||||
agents: {
|
||||
type: 'object',
|
||||
label: 'Agents',
|
||||
category: 'Advanced',
|
||||
requiresRestart: true,
|
||||
default: {},
|
||||
description: 'Settings for subagents.',
|
||||
showInDialog: false,
|
||||
properties: {
|
||||
overrides: {
|
||||
type: 'object',
|
||||
label: 'Agent Overrides',
|
||||
category: 'Advanced',
|
||||
requiresRestart: true,
|
||||
default: {},
|
||||
description:
|
||||
'Override settings for specific agents, e.g. to disable the agent, set a custom model config, or run config.',
|
||||
showInDialog: false,
|
||||
additionalProperties: {
|
||||
type: 'object',
|
||||
ref: 'AgentOverride',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
context: {
|
||||
type: 'object',
|
||||
label: 'Context',
|
||||
@@ -2002,6 +2028,36 @@ export const SETTINGS_SCHEMA_DEFINITIONS: Record<
|
||||
},
|
||||
},
|
||||
},
|
||||
AgentOverride: {
|
||||
type: 'object',
|
||||
description: 'Override settings for a specific agent.',
|
||||
additionalProperties: false,
|
||||
properties: {
|
||||
modelConfig: {
|
||||
type: 'object',
|
||||
additionalProperties: true,
|
||||
},
|
||||
runConfig: {
|
||||
type: 'object',
|
||||
description: 'Run configuration for an agent.',
|
||||
additionalProperties: false,
|
||||
properties: {
|
||||
maxTimeMinutes: {
|
||||
type: 'number',
|
||||
description: 'The maximum execution time for the agent in minutes.',
|
||||
},
|
||||
maxTurns: {
|
||||
type: 'number',
|
||||
description: 'The maximum number of conversational turns.',
|
||||
},
|
||||
},
|
||||
},
|
||||
disabled: {
|
||||
type: 'boolean',
|
||||
description: 'Whether to disable the agent.',
|
||||
},
|
||||
},
|
||||
},
|
||||
CustomTheme: {
|
||||
type: 'object',
|
||||
description:
|
||||
|
||||
Reference in New Issue
Block a user