diff options
Diffstat (limited to 'packages/cli/src/ui/components')
| -rw-r--r-- | packages/cli/src/ui/components/Footer.tsx | 40 | ||||
| -rw-r--r-- | packages/cli/src/ui/components/InputPrompt.tsx | 14 |
2 files changed, 30 insertions, 24 deletions
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<FooterProps> = ({ > <Box> {debugMode && <DebugProfiler />} - {vimMode && <Text color={Colors.Gray}>[{vimMode}] </Text>} + {vimMode && <Text color={theme.text.secondary}>[{vimMode}] </Text>} {nightly ? ( - <Gradient colors={Colors.GradientColors}> + <Gradient colors={theme.ui.gradient}> <Text> {displayPath} {branchName && <Text> ({branchName}*)</Text>} </Text> </Gradient> ) : ( - <Text color={Colors.LightBlue}> + <Text color={theme.text.link}> {displayPath} - {branchName && <Text color={Colors.Gray}> ({branchName}*)</Text>} + {branchName && ( + <Text color={theme.text.secondary}> ({branchName}*)</Text> + )} </Text> )} {debugMode && ( - <Text color={Colors.AccentRed}> + <Text color={theme.status.error}> {' ' + (debugMessage || '--debug')} </Text> )} @@ -102,20 +104,22 @@ export const Footer: React.FC<FooterProps> = ({ {process.env.SANDBOX.replace(/^gemini-(?:cli-)?/, '')} </Text> ) : process.env.SANDBOX === 'sandbox-exec' ? ( - <Text color={Colors.AccentYellow}> + <Text color={theme.status.warning}> macOS Seatbelt{' '} - <Text color={Colors.Gray}>({process.env.SEATBELT_PROFILE})</Text> + <Text color={theme.text.secondary}> + ({process.env.SEATBELT_PROFILE}) + </Text> </Text> ) : ( - <Text color={Colors.AccentRed}> - no sandbox <Text color={Colors.Gray}>(see /docs)</Text> + <Text color={theme.status.error}> + no sandbox <Text color={theme.text.secondary}>(see /docs)</Text> </Text> )} </Box> {/* Right Section: Gemini Label and Console Summary */} <Box alignItems="center" paddingTop={isNarrow ? 1 : 0}> - <Text color={Colors.AccentBlue}> + <Text color={theme.text.accent}> {isNarrow ? '' : ' '} {model}{' '} <ContextUsageDisplay @@ -125,17 +129,17 @@ export const Footer: React.FC<FooterProps> = ({ </Text> {corgiMode && ( <Text> - <Text color={Colors.Gray}>| </Text> - <Text color={Colors.AccentRed}>▼</Text> - <Text color={Colors.Foreground}>(´</Text> - <Text color={Colors.AccentRed}>ᴥ</Text> - <Text color={Colors.Foreground}>`)</Text> - <Text color={Colors.AccentRed}>▼ </Text> + <Text color={theme.ui.symbol}>| </Text> + <Text color={theme.status.error}>▼</Text> + <Text color={theme.text.primary}>(´</Text> + <Text color={theme.status.error}>ᴥ</Text> + <Text color={theme.text.primary}>`)</Text> + <Text color={theme.status.error}>▼ </Text> </Text> )} {!showErrorDetails && errorCount > 0 && ( <Box> - <Text color={Colors.Gray}>| </Text> + <Text color={theme.ui.symbol}>| </Text> <ConsoleSummaryDisplay errorCount={errorCount} /> </Box> )} 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<InputPromptProps> = ({ <> <Box borderStyle="round" - borderColor={shellModeActive ? Colors.AccentYellow : Colors.AccentBlue} + borderColor={ + shellModeActive ? theme.status.warning : theme.border.focused + } paddingX={1} > <Text - color={shellModeActive ? Colors.AccentYellow : Colors.AccentPurple} + color={shellModeActive ? theme.status.warning : theme.text.accent} > {shellModeActive ? ( reverseSearchActive ? ( - <Text color={Colors.AccentCyan}>(r:) </Text> + <Text color={theme.text.link}>(r:) </Text> ) : ( '! ' ) @@ -490,10 +492,10 @@ export const InputPrompt: React.FC<InputPromptProps> = ({ focus ? ( <Text> {chalk.inverse(placeholder.slice(0, 1))} - <Text color={Colors.Gray}>{placeholder.slice(1)}</Text> + <Text color={theme.text.secondary}>{placeholder.slice(1)}</Text> </Text> ) : ( - <Text color={Colors.Gray}>{placeholder}</Text> + <Text color={theme.text.secondary}>{placeholder}</Text> ) ) : ( linesToRender.map((lineText, visualIdxInRenderedSet) => { |
