/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import React from 'react'; import type { HistoryItem } from '../types.js'; import { UserMessage } from './messages/UserMessage.js'; import { UserShellMessage } from './messages/UserShellMessage.js'; import { GeminiMessage } from './messages/GeminiMessage.js'; import { InfoMessage } from './messages/InfoMessage.js'; import { ErrorMessage } from './messages/ErrorMessage.js'; import { ToolGroupMessage } from './messages/ToolGroupMessage.js'; import { GeminiMessageContent } from './messages/GeminiMessageContent.js'; import { CompressionMessage } from './messages/CompressionMessage.js'; import { Box } from 'ink'; import { AboutBox } from './AboutBox.js'; import { StatsDisplay } from './StatsDisplay.js'; import { SessionSummaryDisplay } from './SessionSummaryDisplay.js'; import { Config } from '@gemini-cli/core'; interface HistoryItemDisplayProps { item: HistoryItem; availableTerminalHeight?: number; terminalWidth: number; isPending: boolean; config?: Config; isFocused?: boolean; } export const HistoryItemDisplay: React.FC = ({ item, availableTerminalHeight, terminalWidth, isPending, config, isFocused = true, }) => ( {/* Render standard message types */} {item.type === 'user' && } {item.type === 'user_shell' && } {item.type === 'gemini' && ( )} {item.type === 'gemini_content' && ( )} {item.type === 'info' && } {item.type === 'error' && } {item.type === 'about' && ( )} {item.type === 'stats' && ( )} {item.type === 'quit' && ( )} {item.type === 'tool_group' && ( )} {item.type === 'compression' && ( )} );