mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-06-26 11:17:04 -07:00
feat: add support for Gemini Enterprise (Discovery Engine) assistant
- Implemented EnterpriseAgentProtocol and EnterpriseAgentSession in core - Authenticates seamlessly via Application Default Credentials (ADC) - Added robust brace-counting JSON stream parser with partial chunk caching - Extracted and rendered immersive docArtifacts (markdown tables) E2E - Integrated with CLI config schema and enabled default 'all tools' execution - Added comprehensive unit tests verifying all stream events (thoughts, tools, tables) TAG=agy CONV=81e82460-f8cd-4c7b-a037-2cbedda4d3c0
This commit is contained in:
@@ -35,6 +35,7 @@ import {
|
||||
Scheduler,
|
||||
ROOT_SCHEDULER_ID,
|
||||
LegacyAgentSession,
|
||||
EnterpriseAgentSession,
|
||||
ToolErrorType,
|
||||
geminiPartsToContentParts,
|
||||
displayContentToString,
|
||||
@@ -295,13 +296,16 @@ export async function runNonInteractive({
|
||||
});
|
||||
}
|
||||
|
||||
// Create LegacyAgentSession — owns the agentic loop
|
||||
const session = new LegacyAgentSession({
|
||||
client: geminiClient,
|
||||
scheduler,
|
||||
config,
|
||||
promptId: prompt_id,
|
||||
});
|
||||
const useEnterprise = process.env['GEMINI_CLI_ENTERPRISE_AGENT'] === 'true';
|
||||
// Create AgentSession — owns the agentic loop
|
||||
const session = useEnterprise
|
||||
? new EnterpriseAgentSession({ config, promptId: prompt_id })
|
||||
: new LegacyAgentSession({
|
||||
client: geminiClient,
|
||||
scheduler,
|
||||
config,
|
||||
promptId: prompt_id,
|
||||
});
|
||||
|
||||
// Wire Ctrl+C to session abort
|
||||
abortSession = () => {
|
||||
|
||||
Reference in New Issue
Block a user