mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-06-18 15:27:00 -07:00
37 lines
820 B
TypeScript
37 lines
820 B
TypeScript
/**
|
|
* @license
|
|
* Copyright 2025 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
import { HistoryItemDisplay } from './HistoryItemDisplay.js';
|
|
import type { HistoryItem } from '../types.js';
|
|
import type { SlashCommand } from '../commands/types.js';
|
|
|
|
interface HistoryListProps {
|
|
history: HistoryItem[];
|
|
terminalWidth: number;
|
|
staticAreaMaxItemHeight: number;
|
|
slashCommands: readonly SlashCommand[];
|
|
}
|
|
|
|
export const HistoryList = ({
|
|
history,
|
|
terminalWidth,
|
|
staticAreaMaxItemHeight,
|
|
slashCommands,
|
|
}: HistoryListProps) => (
|
|
<>
|
|
{history.map((h) => (
|
|
<HistoryItemDisplay
|
|
terminalWidth={terminalWidth}
|
|
availableTerminalHeight={staticAreaMaxItemHeight}
|
|
key={h.id}
|
|
item={h}
|
|
isPending={false}
|
|
commands={slashCommands}
|
|
/>
|
|
))}
|
|
</>
|
|
);
|