From 785ee5d59a60df89413d8f0dd1b7916279f6e786 Mon Sep 17 00:00:00 2001 From: Miguel Solorio Date: Thu, 7 Aug 2025 16:11:35 -0700 Subject: Use semantic colors in themes (#5796) Co-authored-by: Jacob Richman --- packages/cli/src/ui/components/Footer.tsx | 40 ++++++++++++++------------ packages/cli/src/ui/components/InputPrompt.tsx | 14 +++++---- 2 files changed, 30 insertions(+), 24 deletions(-) (limited to 'packages/cli/src/ui/components') diff --git a/packages/cli/src/ui/components/Footer.tsx b/packages/cli/src/ui/components/Footer.tsx index 7de47659..aaf6c176 100644 --- a/packages/cli/src/ui/components/Footer.tsx +++ b/packages/cli/src/ui/components/Footer.tsx @@ -6,7 +6,7 @@ import React from 'react'; import { Box, Text } from 'ink'; -import { Colors } from '../colors.js'; +import { theme } from '../semantic-colors.js'; import { shortenPath, tildeifyPath } from '@google/gemini-cli-core'; import { ConsoleSummaryDisplay } from './ConsoleSummaryDisplay.js'; import process from 'node:process'; @@ -67,22 +67,24 @@ export const Footer: React.FC = ({ > {debugMode && } - {vimMode && [{vimMode}] } + {vimMode && [{vimMode}] } {nightly ? ( - + {displayPath} {branchName && ({branchName}*)} ) : ( - + {displayPath} - {branchName && ({branchName}*)} + {branchName && ( + ({branchName}*) + )} )} {debugMode && ( - + {' ' + (debugMessage || '--debug')} )} @@ -102,20 +104,22 @@ export const Footer: React.FC = ({ {process.env.SANDBOX.replace(/^gemini-(?:cli-)?/, '')} ) : process.env.SANDBOX === 'sandbox-exec' ? ( - + macOS Seatbelt{' '} - ({process.env.SEATBELT_PROFILE}) + + ({process.env.SEATBELT_PROFILE}) + ) : ( - - no sandbox (see /docs) + + no sandbox (see /docs) )} {/* Right Section: Gemini Label and Console Summary */} - + {isNarrow ? '' : ' '} {model}{' '} = ({ {corgiMode && ( - | - - - - `) - + | + + + + `) + )} {!showErrorDetails && errorCount > 0 && ( - | + | )} diff --git a/packages/cli/src/ui/components/InputPrompt.tsx b/packages/cli/src/ui/components/InputPrompt.tsx index 7a7a9934..7250afea 100644 --- a/packages/cli/src/ui/components/InputPrompt.tsx +++ b/packages/cli/src/ui/components/InputPrompt.tsx @@ -6,7 +6,7 @@ import React, { useCallback, useEffect, useState } from 'react'; import { Box, Text } from 'ink'; -import { Colors } from '../colors.js'; +import { theme } from '../semantic-colors.js'; import { SuggestionsDisplay } from './SuggestionsDisplay.js'; import { useInputHistory } from '../hooks/useInputHistory.js'; import { TextBuffer, logicalPosToOffset } from './shared/text-buffer.js'; @@ -469,15 +469,17 @@ export const InputPrompt: React.FC = ({ <> {shellModeActive ? ( reverseSearchActive ? ( - (r:) + (r:) ) : ( '! ' ) @@ -490,10 +492,10 @@ export const InputPrompt: React.FC = ({ focus ? ( {chalk.inverse(placeholder.slice(0, 1))} - {placeholder.slice(1)} + {placeholder.slice(1)} ) : ( - {placeholder} + {placeholder} ) ) : ( linesToRender.map((lineText, visualIdxInRenderedSet) => { -- cgit v1.2.3