mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-24 20:14:44 -07:00
feat(plan): add experimental plan flag (#16650)
This commit is contained in:
@@ -1924,6 +1924,29 @@ describe('Config Quota & Preview Model Access', () => {
|
||||
expect(config.getModel()).toBe(PREVIEW_GEMINI_MODEL);
|
||||
});
|
||||
});
|
||||
|
||||
describe('isPlanEnabled', () => {
|
||||
it('should return false by default', () => {
|
||||
const config = new Config(baseParams);
|
||||
expect(config.isPlanEnabled()).toBe(false);
|
||||
});
|
||||
|
||||
it('should return true when plan is enabled', () => {
|
||||
const config = new Config({
|
||||
...baseParams,
|
||||
plan: true,
|
||||
});
|
||||
expect(config.isPlanEnabled()).toBe(true);
|
||||
});
|
||||
|
||||
it('should return false when plan is explicitly disabled', () => {
|
||||
const config = new Config({
|
||||
...baseParams,
|
||||
plan: false,
|
||||
});
|
||||
expect(config.isPlanEnabled()).toBe(false);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('Config JIT Initialization', () => {
|
||||
|
||||
@@ -380,6 +380,7 @@ export interface ConfigParameters {
|
||||
adminSkillsEnabled?: boolean;
|
||||
experimentalJitContext?: boolean;
|
||||
disableLLMCorrection?: boolean;
|
||||
plan?: boolean;
|
||||
onModelChange?: (model: string) => void;
|
||||
mcpEnabled?: boolean;
|
||||
extensionsEnabled?: boolean;
|
||||
@@ -531,6 +532,7 @@ export class Config {
|
||||
|
||||
private readonly experimentalJitContext: boolean;
|
||||
private readonly disableLLMCorrection: boolean;
|
||||
private readonly planEnabled: boolean;
|
||||
private contextManager?: ContextManager;
|
||||
private terminalBackground: string | undefined = undefined;
|
||||
private remoteAdminSettings: GeminiCodeAssistSetting | undefined;
|
||||
@@ -602,6 +604,7 @@ export class Config {
|
||||
this.enableAgents = params.enableAgents ?? false;
|
||||
this.agents = params.agents ?? {};
|
||||
this.disableLLMCorrection = params.disableLLMCorrection ?? false;
|
||||
this.planEnabled = params.plan ?? false;
|
||||
this.skillsSupport = params.skillsSupport ?? false;
|
||||
this.disabledSkills = params.disabledSkills ?? [];
|
||||
this.adminSkillsEnabled = params.adminSkillsEnabled ?? true;
|
||||
@@ -1469,6 +1472,10 @@ export class Config {
|
||||
return this.disableLLMCorrection;
|
||||
}
|
||||
|
||||
isPlanEnabled(): boolean {
|
||||
return this.planEnabled;
|
||||
}
|
||||
|
||||
isAgentsEnabled(): boolean {
|
||||
return this.enableAgents;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user