mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-29 07:21:27 -07:00
feat(cli): support independent light and dark mode themes
This commit is contained in:
@@ -597,6 +597,8 @@ export interface ConfigParameters {
|
||||
billing?: {
|
||||
overageStrategy?: OverageStrategy;
|
||||
};
|
||||
cliTheme?: string;
|
||||
cliThemeMode?: 'light' | 'dark';
|
||||
}
|
||||
|
||||
export class Config implements McpContext {
|
||||
@@ -626,6 +628,8 @@ export class Config implements McpContext {
|
||||
private readonly debugMode: boolean;
|
||||
private readonly question: string | undefined;
|
||||
readonly enableConseca: boolean;
|
||||
private readonly cliTheme?: string;
|
||||
private readonly cliThemeMode?: 'light' | 'dark';
|
||||
|
||||
private readonly coreTools: string[] | undefined;
|
||||
/** @deprecated Use Policy Engine instead */
|
||||
@@ -819,6 +823,9 @@ export class Config implements McpContext {
|
||||
this.pendingIncludeDirectories = params.includeDirectories ?? [];
|
||||
this.debugMode = params.debugMode;
|
||||
this.question = params.question;
|
||||
this.enableConseca = params.enableConseca ?? false;
|
||||
this.cliTheme = params.cliTheme;
|
||||
this.cliThemeMode = params.cliThemeMode;
|
||||
|
||||
this.coreTools = params.coreTools;
|
||||
this.allowedTools = params.allowedTools;
|
||||
@@ -1561,6 +1568,14 @@ export class Config implements McpContext {
|
||||
return this.sandbox;
|
||||
}
|
||||
|
||||
getCliTheme(): string | undefined {
|
||||
return this.cliTheme;
|
||||
}
|
||||
|
||||
getCliThemeMode(): 'light' | 'dark' | undefined {
|
||||
return this.cliThemeMode;
|
||||
}
|
||||
|
||||
isRestrictiveSandbox(): boolean {
|
||||
const sandboxConfig = this.getSandbox();
|
||||
const seatbeltProfile = process.env['SEATBELT_PROFILE'];
|
||||
|
||||
@@ -51,7 +51,7 @@ describe('FolderTrustDiscoveryService', () => {
|
||||
BeforeTool: [{ command: 'test-hook' }],
|
||||
},
|
||||
general: { vimMode: true },
|
||||
ui: { theme: 'Dark' },
|
||||
ui: { themeLight: 'Dark', themeDark: 'Dark' },
|
||||
};
|
||||
await fs.writeFile(
|
||||
path.join(geminiDir, 'settings.json'),
|
||||
|
||||
Reference in New Issue
Block a user