mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-20 18:14:29 -07:00
feat: Add red threshold for getStatusColor util (#9789)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Co-authored-by: Jacob Richman <jacob314@gmail.com>
This commit is contained in:
@@ -19,7 +19,7 @@ export const CACHE_EFFICIENCY_MEDIUM = 15;
|
||||
// --- Color Logic ---
|
||||
export const getStatusColor = (
|
||||
value: number,
|
||||
thresholds: { green: number; yellow: number },
|
||||
thresholds: { green: number; yellow: number; red?: number },
|
||||
options: { defaultColor?: string } = {},
|
||||
) => {
|
||||
if (value >= thresholds.green) {
|
||||
@@ -28,5 +28,8 @@ export const getStatusColor = (
|
||||
if (value >= thresholds.yellow) {
|
||||
return theme.status.warning;
|
||||
}
|
||||
if (thresholds.red != null && value >= thresholds.red) {
|
||||
return theme.status.error;
|
||||
}
|
||||
return options.defaultColor ?? theme.status.error;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user