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:
mkorwel
2026-02-19 21:24:42 -06:00
committed by Matt Korwel
parent 24bbeb11c7
commit 14a7be90d4
8 changed files with 64 additions and 1 deletions
@@ -2217,6 +2217,15 @@ const SETTINGS_SCHEMA = {
'Enable the experimental Topic & Update communication model for reduced chattiness and structured progress reporting.',
showInDialog: true,
},
'enable-awesome': {
type: 'boolean',
label: 'Enable Awesome',
category: 'Experimental',
requiresRestart: false,
default: false,
description: "When enabled, the ASCII art says 'matt'.",
showInDialog: true,
},
},
},
extensions: {
@@ -121,6 +121,7 @@ export const createMockConfig = (overrides: Partial<Config> = {}): Config =>
getCompressionThreshold: vi.fn().mockResolvedValue(undefined),
getUserCaching: vi.fn().mockResolvedValue(false),
isNumericalRoutingEnabled: vi.fn().mockReturnValue(false),
isAwesomeEnabled: vi.fn().mockReturnValue(false),
getClassifierThreshold: vi.fn().mockResolvedValue(undefined),
getBannerTextNoCapacityIssues: vi.fn().mockResolvedValue(''),
getBannerTextCapacityIssues: vi.fn().mockResolvedValue(''),
@@ -57,3 +57,14 @@ export const tinyAsciiLogoCompactText = `
`;
export const mattAsciiLogo = `
`;
+10 -1
View File
@@ -7,10 +7,16 @@
import type React from 'react';
import { Box } from 'ink';
import { ThemedGradient } from './ThemedGradient.js';
import { shortAsciiLogo, longAsciiLogo, tinyAsciiLogo } from './AsciiArt.js';
import {
shortAsciiLogo,
longAsciiLogo,
tinyAsciiLogo,
mattAsciiLogo,
} from './AsciiArt.js';
import { getAsciiArtWidth } from '../utils/textUtils.js';
import { useTerminalSize } from '../hooks/useTerminalSize.js';
import { useSnowfall } from '../hooks/useSnowfall.js';
import { useConfig } from '../contexts/ConfigContext.js';
interface HeaderProps {
customAsciiArt?: string; // For user-defined ASCII art
@@ -23,6 +29,7 @@ export const Header: React.FC<HeaderProps> = ({
version,
nightly,
}) => {
const config = useConfig();
const { columns: terminalWidth } = useTerminalSize();
let displayTitle;
const widthOfLongLogo = getAsciiArtWidth(longAsciiLogo);
@@ -30,6 +37,8 @@ export const Header: React.FC<HeaderProps> = ({
if (customAsciiArt) {
displayTitle = customAsciiArt;
} else if (config.isAwesomeEnabled()) {
displayTitle = mattAsciiLogo;
} else if (terminalWidth >= widthOfLongLogo) {
displayTitle = longAsciiLogo;
} else if (terminalWidth >= widthOfShortLogo) {
@@ -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);
});
});
+6
View File
@@ -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)
);
}
+8
View File
@@ -2877,6 +2877,7 @@
"default": false,
"type": "boolean"
},
<<<<<<< HEAD
"directWebFetch": {
"title": "Direct Web Fetch",
"description": "Enable web fetch behavior that bypasses LLM summarization.",
@@ -2959,6 +2960,13 @@
"markdownDescription": "Enable the experimental Topic & Update communication model for reduced chattiness and structured progress reporting.\n\n- Category: `Experimental`\n- Requires restart: `no`\n- Default: `false`",
"default": false,
"type": "boolean"
},
"enable-awesome": {
"title": "Enable Awesome",
"description": "When enabled, the ASCII art says 'matt'.",
"markdownDescription": "When enabled, the ASCII art says 'matt'.\n\n- Category: `Experimental`\n- Requires restart: `no`\n- Default: `false`",
"default": false,
"type": "boolean"
}
},
"additionalProperties": false