mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-06-27 11:47:46 -07:00
feat(cli): add dynamic agent switcher and /agent subcommand
- Implemented /agent command with manage (opens dialog) and set subcommands. - Created AgentDialog component for choosing between standard and enterprise agents. - Integrated remember agent setting with persist toggle. - Wired --agent cli argument for booting directly into specific agent. - Handled clean session remounting on agent swap via React key-swapping of AppContainer, fully complying with Rules of Hooks. - Added agent-name persistently to the status bar footer items. - Resolved dynamic routing inside non-interactive headless loops to fully support Gemini Enterprise prompts. TAG=agy CONV=81e82460-f8cd-4c7b-a037-2cbedda4d3c0
This commit is contained in:
@@ -296,7 +296,9 @@ export async function runNonInteractive({
|
||||
});
|
||||
}
|
||||
|
||||
const useEnterprise = process.env['GEMINI_CLI_ENTERPRISE_AGENT'] === 'true';
|
||||
const useEnterprise =
|
||||
config.getAgent() === 'gemini-enterprise' ||
|
||||
process.env['GEMINI_CLI_ENTERPRISE_AGENT'] === 'true';
|
||||
// Create AgentSession — owns the agentic loop
|
||||
const session = useEnterprise
|
||||
? new EnterpriseAgentSession({ config, promptId: prompt_id })
|
||||
|
||||
Reference in New Issue
Block a user