mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-07-18 22:10:52 -07:00
feat(config): add experimental.adk.agentSessionNoninteractiveEnabled setting
This commit is contained in:
@@ -3416,3 +3416,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);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -238,6 +238,10 @@ export interface GemmaModelRouterSettings {
|
||||
};
|
||||
}
|
||||
|
||||
export interface ADKSettings {
|
||||
agentSessionNoninteractiveEnabled?: boolean;
|
||||
}
|
||||
|
||||
export interface ExtensionSetting {
|
||||
name: string;
|
||||
description: string;
|
||||
@@ -675,6 +679,7 @@ export interface ConfigParameters {
|
||||
policyUpdateConfirmationRequest?: PolicyUpdateConfirmationRequest;
|
||||
output?: OutputSettings;
|
||||
gemmaModelRouter?: GemmaModelRouterSettings;
|
||||
adk?: ADKSettings;
|
||||
disableModelRouterForAuth?: AuthType[];
|
||||
continueOnFailedApiCall?: boolean;
|
||||
retryFetchErrors?: boolean;
|
||||
@@ -896,6 +901,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;
|
||||
@@ -1309,6 +1315,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,
|
||||
@@ -3343,6 +3352,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