mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-07-11 10:30:46 -07:00
feat(config): add enable-awesome experiment to show custom ASCII art
- Add ENABLE_AWESOME experiment flag (45758820). - Update settings schema and regenerate JSON schema. - Implement config.isAwesomeEnabled() wrapper. - Add 'matt' ASCII art and update Header component to use it. - Add unit tests for the new flag.
This commit is contained in:
@@ -20,6 +20,7 @@ export const ExperimentFlags = {
|
||||
PRO_MODEL_NO_ACCESS: 45768879,
|
||||
GEMINI_3_1_FLASH_LITE_LAUNCHED: 45771641,
|
||||
DEFAULT_REQUEST_TIMEOUT: 45773134,
|
||||
ENABLE_AWESOME: 45758820,
|
||||
} as const;
|
||||
|
||||
export type ExperimentFlagName =
|
||||
@@ -87,6 +88,11 @@ export const ExperimentMetadata: Record<number, ExperimentMetadataEntry> = {
|
||||
type: 'boolean',
|
||||
defaultValue: true,
|
||||
},
|
||||
[ExperimentFlags.ENABLE_AWESOME]: {
|
||||
description: "When enabled, the ASCII art says 'matt'.",
|
||||
type: 'boolean',
|
||||
defaultValue: false,
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -126,4 +126,17 @@ describe('Config getExperimentValue', () => {
|
||||
config.getExperimentValue<number>(ExperimentFlags.CLASSIFIER_THRESHOLD),
|
||||
).toBe(0.7);
|
||||
});
|
||||
|
||||
it('should return true for isAwesomeEnabled when flag is set', () => {
|
||||
const config = new Config({
|
||||
sessionId,
|
||||
targetDir,
|
||||
cwd,
|
||||
model,
|
||||
debugMode: false,
|
||||
experimentalCliArgs: { 'enable-awesome': true },
|
||||
});
|
||||
|
||||
expect(config.isAwesomeEnabled()).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -3079,6 +3079,7 @@ export class Config implements McpContext, AgentLoopContext {
|
||||
);
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
/**
|
||||
* Returns whether the user has access to Pro models.
|
||||
* This is determined by the PRO_MODEL_NO_ACCESS experiment flag.
|
||||
@@ -3197,6 +3198,11 @@ export class Config implements McpContext, AgentLoopContext {
|
||||
return (
|
||||
this.experiments?.flags[ExperimentFlags.GEMINI_3_1_FLASH_LITE_LAUNCHED]
|
||||
?.boolValue ?? false
|
||||
=======
|
||||
isAwesomeEnabled(): boolean {
|
||||
return (
|
||||
this.getExperimentValue<boolean>(ExperimentFlags.ENABLE_AWESOME) ?? false
|
||||
>>>>>>> d2ce1460f (feat(config): add enable-awesome experiment to show custom ASCII art)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user