Download packages/cli/src/core/theme.ts from SaylorTwift/gemini-cli: direct link, hf CLI and curl.
- Browser
- Download file 649 Bytes
-
https://huggingface.co/SaylorTwift/gemini-cli/resolve/main/packages/cli/src/core/theme.ts
- Command line
-
hf download hf://SaylorTwift/gemini-cli/packages/cli/src/core/theme.ts
-
curl -L -o theme.ts https://huggingface.co/SaylorTwift/gemini-cli/resolve/main/packages/cli/src/core/theme.ts
649 Bytes
| /** | |
| * @license | |
| * Copyright 2025 Google LLC | |
| * SPDX-License-Identifier: Apache-2.0 | |
| */ | |
| import { themeManager } from '../ui/themes/theme-manager.js'; | |
| import { type LoadedSettings } from '../config/settings.js'; | |
| /** | |
| * Validates the configured theme. | |
| * @param settings The loaded application settings. | |
| * @returns An error message if the theme is not found, otherwise null. | |
| */ | |
| export function validateTheme(settings: LoadedSettings): string | null { | |
| const effectiveTheme = settings.merged.ui.theme; | |
| if (effectiveTheme && !themeManager.findThemeByName(effectiveTheme)) { | |
| return `Theme "${effectiveTheme}" not found.`; | |
| } | |
| return null; | |
| } | |