mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-30 15:04:16 -07:00
feat(ui): standardize semantic focus colors and enhance history visibility (#20745)
Co-authored-by: jacob314 <jacob314@gmail.com>
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import { Box, Text } from 'ink';
|
||||
import { ToolCallStatus, mapCoreStatusToDisplayStatus } from '../../types.js';
|
||||
import { GeminiRespondingSpinner } from '../GeminiRespondingSpinner.js';
|
||||
import { CliSpinner } from '../CliSpinner.js';
|
||||
import {
|
||||
SHELL_COMMAND_NAME,
|
||||
SHELL_NAME,
|
||||
@@ -123,7 +123,7 @@ export const FocusHint: React.FC<{
|
||||
|
||||
return (
|
||||
<Box marginLeft={1} flexShrink={0}>
|
||||
<Text color={theme.text.accent}>
|
||||
<Text color={isThisShellFocused ? theme.ui.focus : theme.ui.active}>
|
||||
{isThisShellFocused
|
||||
? `(${formatCommand(Command.UNFOCUS_SHELL_INPUT)} to unfocus)`
|
||||
: `(${formatCommand(Command.FOCUS_SHELL_INPUT)} to focus)`}
|
||||
@@ -137,15 +137,21 @@ export type TextEmphasis = 'high' | 'medium' | 'low';
|
||||
type ToolStatusIndicatorProps = {
|
||||
status: CoreToolCallStatus;
|
||||
name: string;
|
||||
isFocused?: boolean;
|
||||
};
|
||||
|
||||
export const ToolStatusIndicator: React.FC<ToolStatusIndicatorProps> = ({
|
||||
status: coreStatus,
|
||||
name,
|
||||
isFocused,
|
||||
}) => {
|
||||
const status = mapCoreStatusToDisplayStatus(coreStatus);
|
||||
const isShell = isShellTool(name);
|
||||
const statusColor = isShell ? theme.ui.symbol : theme.status.warning;
|
||||
const statusColor = isFocused
|
||||
? theme.ui.focus
|
||||
: isShell
|
||||
? theme.ui.active
|
||||
: theme.status.warning;
|
||||
|
||||
return (
|
||||
<Box minWidth={STATUS_INDICATOR_WIDTH}>
|
||||
@@ -153,10 +159,9 @@ export const ToolStatusIndicator: React.FC<ToolStatusIndicatorProps> = ({
|
||||
<Text color={theme.status.success}>{TOOL_STATUS.PENDING}</Text>
|
||||
)}
|
||||
{status === ToolCallStatus.Executing && (
|
||||
<GeminiRespondingSpinner
|
||||
spinnerType="toggle"
|
||||
nonRespondingDisplay={TOOL_STATUS.EXECUTING}
|
||||
/>
|
||||
<Text color={statusColor}>
|
||||
<CliSpinner type="toggle" />
|
||||
</Text>
|
||||
)}
|
||||
{status === ToolCallStatus.Success && (
|
||||
<Text color={theme.status.success} aria-label={'Success:'}>
|
||||
|
||||
Reference in New Issue
Block a user