Skip to content

Commit 013d5df

Browse files
authored
refactor(cli): categorize built-in themes into dark/ and light/ directories (google-gemini#18634)
1 parent 3d4956a commit 013d5df

24 files changed

+77
-77
lines changed

packages/cli/src/config/settings.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ import {
2020
type AdminControlsSettings,
2121
} from '@google/gemini-cli-core';
2222
import stripJsonComments from 'strip-json-comments';
23-
import { DefaultLight } from '../ui/themes/default-light.js';
24-
import { DefaultDark } from '../ui/themes/default.js';
23+
import { DefaultLight } from '../ui/themes/builtin/light/default-light.js';
24+
import { DefaultDark } from '../ui/themes/builtin/dark/default-dark.js';
2525
import { isWorkspaceTrusted } from './trustedFolders.js';
2626
import {
2727
type Settings,

packages/cli/src/test-utils/render.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ import { AppContext, type AppState } from '../ui/contexts/AppContext.js';
5050
import { createMockSettings } from './settings.js';
5151
import { SessionStatsProvider } from '../ui/contexts/SessionContext.js';
5252
import { themeManager, DEFAULT_THEME } from '../ui/themes/theme-manager.js';
53-
import { DefaultLight } from '../ui/themes/default-light.js';
53+
import { DefaultLight } from '../ui/themes/builtin/light/default-light.js';
5454
import { pickDefaultThemeName } from '../ui/themes/theme.js';
5555
import { generateSvgForTerminal } from './svg.js';
5656

packages/cli/src/ui/hooks/useSnowfall.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ vi.mock('../themes/theme-manager.js', () => ({
2323
DEFAULT_THEME: { name: 'Default' },
2424
}));
2525

26-
vi.mock('../themes/holiday.js', () => ({
26+
vi.mock('../themes/builtin/dark/holiday-dark.js', () => ({
2727
Holiday: { name: 'Holiday' },
2828
}));
2929

packages/cli/src/ui/hooks/useSnowfall.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { useState, useEffect, useMemo } from 'react';
88
import { getAsciiArtWidth } from '../utils/textUtils.js';
99
import { debugState } from '../debug.js';
1010
import { themeManager } from '../themes/theme-manager.js';
11-
import { Holiday } from '../themes/holiday.js';
11+
import { Holiday } from '../themes/builtin/dark/holiday-dark.js';
1212
import { useUIState } from '../contexts/UIStateContext.js';
1313
import { useTerminalSize } from './useTerminalSize.js';
1414
import { shortAsciiLogo } from '../components/AsciiArt.js';

packages/cli/src/ui/hooks/useTerminalTheme.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ vi.mock('../themes/theme-manager.js', async (importOriginal) => {
6565
};
6666
});
6767

68-
vi.mock('../themes/default-light.js', () => ({
68+
vi.mock('../themes/builtin/light/default-light.js', () => ({
6969
DefaultLight: { name: 'default-light' },
7070
}));
7171

packages/cli/src/ui/hooks/useTerminalTheme.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
shouldSwitchTheme,
1212
} from '../themes/color-utils.js';
1313
import { themeManager, DEFAULT_THEME } from '../themes/theme-manager.js';
14-
import { DefaultLight } from '../themes/default-light.js';
14+
import { DefaultLight } from '../themes/builtin/light/default-light.js';
1515
import { useSettings } from '../contexts/SettingsContext.js';
1616
import type { Config } from '@google/gemini-cli-core';
1717
import { useTerminalContext } from '../contexts/TerminalContext.js';

packages/cli/src/ui/themes/ansi.ts renamed to packages/cli/src/ui/themes/builtin/dark/ansi-dark.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/**
22
* @license
3-
* Copyright 2025 Google LLC
3+
* Copyright 2026 Google LLC
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

7-
import { type ColorsTheme, Theme } from './theme.js';
8-
import { darkSemanticColors } from './semantic-tokens.js';
7+
import { type ColorsTheme, Theme } from '../../theme.js';
8+
import { darkSemanticColors } from '../../semantic-tokens.js';
99

1010
const ansiColors: ColorsTheme = {
1111
type: 'dark',

packages/cli/src/ui/themes/atom-one-dark.ts renamed to packages/cli/src/ui/themes/builtin/dark/atom-one-dark.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/**
22
* @license
3-
* Copyright 2025 Google LLC
3+
* Copyright 2026 Google LLC
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

7-
import { type ColorsTheme, Theme } from './theme.js';
8-
import { interpolateColor } from './color-utils.js';
7+
import { type ColorsTheme, Theme } from '../../theme.js';
8+
import { interpolateColor } from '../../color-utils.js';
99

1010
const atomOneDarkColors: ColorsTheme = {
1111
type: 'dark',

packages/cli/src/ui/themes/ayu.ts renamed to packages/cli/src/ui/themes/builtin/dark/ayu-dark.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/**
22
* @license
3-
* Copyright 2025 Google LLC
3+
* Copyright 2026 Google LLC
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

7-
import { type ColorsTheme, Theme } from './theme.js';
8-
import { interpolateColor } from './color-utils.js';
7+
import { type ColorsTheme, Theme } from '../../theme.js';
8+
import { interpolateColor } from '../../color-utils.js';
99

1010
const ayuDarkColors: ColorsTheme = {
1111
type: 'dark',

packages/cli/src/ui/themes/default.ts renamed to packages/cli/src/ui/themes/builtin/dark/default-dark.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
/**
22
* @license
3-
* Copyright 2025 Google LLC
3+
* Copyright 2026 Google LLC
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

7-
import { darkTheme, Theme } from './theme.js';
7+
import { darkTheme, Theme } from '../../theme.js';
88

99
export const DefaultDark: Theme = new Theme(
1010
'Default',

0 commit comments

Comments
 (0)