mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-21 10:34:35 -07:00
feat(config): add experimental.adk.agentSessionNoninteractiveEnabled setting (#24439)
This commit is contained in:
@@ -3445,3 +3445,29 @@ describe('ConfigSchema validation', () => {
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
describe('ADKSettings', () => {
|
||||
const baseParams: ConfigParameters = {
|
||||
sessionId: 'test',
|
||||
targetDir: '.',
|
||||
debugMode: false,
|
||||
model: 'test-model',
|
||||
cwd: '.',
|
||||
};
|
||||
|
||||
it('should default agentSessionNoninteractiveEnabled to false', () => {
|
||||
const config = new Config(baseParams);
|
||||
expect(config.getAgentSessionNoninteractiveEnabled()).toBe(false);
|
||||
});
|
||||
|
||||
it('should return provided agentSessionNoninteractiveEnabled', () => {
|
||||
const params: ConfigParameters = {
|
||||
...baseParams,
|
||||
adk: {
|
||||
agentSessionNoninteractiveEnabled: true,
|
||||
},
|
||||
};
|
||||
const config = new Config(params);
|
||||
expect(config.getAgentSessionNoninteractiveEnabled()).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -240,6 +240,10 @@ export interface GemmaModelRouterSettings {
|
||||
};
|
||||
}
|
||||
|
||||
export interface ADKSettings {
|
||||
agentSessionNoninteractiveEnabled?: boolean;
|
||||
}
|
||||
|
||||
export interface ExtensionSetting {
|
||||
name: string;
|
||||
description: string;
|
||||
@@ -677,6 +681,7 @@ export interface ConfigParameters {
|
||||
policyUpdateConfirmationRequest?: PolicyUpdateConfirmationRequest;
|
||||
output?: OutputSettings;
|
||||
gemmaModelRouter?: GemmaModelRouterSettings;
|
||||
adk?: ADKSettings;
|
||||
disableModelRouterForAuth?: AuthType[];
|
||||
continueOnFailedApiCall?: boolean;
|
||||
retryFetchErrors?: boolean;
|
||||
@@ -899,6 +904,7 @@ export class Config implements McpContext, AgentLoopContext {
|
||||
private readonly outputSettings: OutputSettings;
|
||||
|
||||
private readonly gemmaModelRouter: GemmaModelRouterSettings;
|
||||
private readonly agentSessionNoninteractiveEnabled: boolean;
|
||||
|
||||
private readonly continueOnFailedApiCall: boolean;
|
||||
private readonly retryFetchErrors: boolean;
|
||||
@@ -1316,6 +1322,9 @@ export class Config implements McpContext, AgentLoopContext {
|
||||
params.gemmaModelRouter?.classifier?.model ?? 'gemma3-1b-gpu-custom',
|
||||
},
|
||||
};
|
||||
|
||||
this.agentSessionNoninteractiveEnabled =
|
||||
params.adk?.agentSessionNoninteractiveEnabled ?? false;
|
||||
this.retryFetchErrors = params.retryFetchErrors ?? true;
|
||||
this.maxAttempts = Math.min(
|
||||
params.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
|
||||
@@ -3367,6 +3376,10 @@ export class Config implements McpContext, AgentLoopContext {
|
||||
return this.gemmaModelRouter;
|
||||
}
|
||||
|
||||
getAgentSessionNoninteractiveEnabled(): boolean {
|
||||
return this.agentSessionNoninteractiveEnabled;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get override settings for a specific agent.
|
||||
* Reads from agents.overrides.<agentName>.
|
||||
|
||||
Reference in New Issue
Block a user