Download projects/gemini-cli/packages/cli/src/ui/utils/displayUtils.ts from LevelUp2x/adaptai: direct link, hf CLI and curl.
- Browser
- Download file 781 Bytes
-
https://huggingface.co/datasets/LevelUp2x/adaptai/resolve/2147bc06c2ccf123b96f98eace2e6bf6486e7f0e/projects/gemini-cli/packages/cli/src/ui/utils/displayUtils.ts
- Command line
-
hf download hf://datasets/LevelUp2x/adaptai@2147bc06c2ccf123b96f98eace2e6bf6486e7f0e/projects/gemini-cli/packages/cli/src/ui/utils/displayUtils.ts
-
curl -L -o displayUtils.ts https://huggingface.co/datasets/LevelUp2x/adaptai/resolve/2147bc06c2ccf123b96f98eace2e6bf6486e7f0e/projects/gemini-cli/packages/cli/src/ui/utils/displayUtils.ts
781 Bytes
| /** | |
| * @license | |
| * Copyright 2025 Google LLC | |
| * SPDX-License-Identifier: Apache-2.0 | |
| */ | |
| import { Colors } from '../colors.js'; | |
| // --- Thresholds --- | |
| export const TOOL_SUCCESS_RATE_HIGH = 95; | |
| export const TOOL_SUCCESS_RATE_MEDIUM = 85; | |
| export const USER_AGREEMENT_RATE_HIGH = 75; | |
| export const USER_AGREEMENT_RATE_MEDIUM = 45; | |
| export const CACHE_EFFICIENCY_HIGH = 40; | |
| export const CACHE_EFFICIENCY_MEDIUM = 15; | |
| // --- Color Logic --- | |
| export const getStatusColor = ( | |
| value: number, | |
| thresholds: { green: number; yellow: number }, | |
| options: { defaultColor?: string } = {}, | |
| ) => { | |
| if (value >= thresholds.green) { | |
| return Colors.AccentGreen; | |
| } | |
| if (value >= thresholds.yellow) { | |
| return Colors.AccentYellow; | |
| } | |
| return options.defaultColor || Colors.AccentRed; | |
| }; | |