mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-19 09:41:17 -07:00
Run npm run format
- Also updated README.md accordingly. Part of https://b.corp.google.com/issues/411384603
This commit is contained in:
committed by
N. Taylor Mullen
parent
7928c1727f
commit
cfc697a96d
@@ -10,30 +10,33 @@ import ToolGroupMessage from './messages/ToolGroupMessage.js';
|
||||
import { PartListUnion } from '@google/genai';
|
||||
|
||||
interface HistoryDisplayProps {
|
||||
history: HistoryItem[];
|
||||
onSubmit: (value: PartListUnion) => void;
|
||||
history: HistoryItem[];
|
||||
onSubmit: (value: PartListUnion) => void;
|
||||
}
|
||||
|
||||
const HistoryDisplay: React.FC<HistoryDisplayProps> = ({ history, onSubmit }) => {
|
||||
// No grouping logic needed here anymore
|
||||
return (
|
||||
<Box flexDirection="column">
|
||||
{history.map((item) => (
|
||||
<Box key={item.id} marginBottom={1}>
|
||||
{/* Render standard message types */}
|
||||
{item.type === 'user' && <UserMessage text={item.text} />}
|
||||
{item.type === 'gemini' && <GeminiMessage text={item.text} />}
|
||||
{item.type === 'info' && <InfoMessage text={item.text} />}
|
||||
{item.type === 'error' && <ErrorMessage text={item.text} />}
|
||||
const HistoryDisplay: React.FC<HistoryDisplayProps> = ({
|
||||
history,
|
||||
onSubmit,
|
||||
}) => {
|
||||
// No grouping logic needed here anymore
|
||||
return (
|
||||
<Box flexDirection="column">
|
||||
{history.map((item) => (
|
||||
<Box key={item.id} marginBottom={1}>
|
||||
{/* Render standard message types */}
|
||||
{item.type === 'user' && <UserMessage text={item.text} />}
|
||||
{item.type === 'gemini' && <GeminiMessage text={item.text} />}
|
||||
{item.type === 'info' && <InfoMessage text={item.text} />}
|
||||
{item.type === 'error' && <ErrorMessage text={item.text} />}
|
||||
|
||||
{/* Render the tool group component */}
|
||||
{item.type === 'tool_group' && (
|
||||
<ToolGroupMessage toolCalls={item.tools} onSubmit={onSubmit} />
|
||||
)}
|
||||
</Box>
|
||||
))}
|
||||
{/* Render the tool group component */}
|
||||
{item.type === 'tool_group' && (
|
||||
<ToolGroupMessage toolCalls={item.tools} onSubmit={onSubmit} />
|
||||
)}
|
||||
</Box>
|
||||
);
|
||||
))}
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
|
||||
export default HistoryDisplay;
|
||||
export default HistoryDisplay;
|
||||
|
||||
Reference in New Issue
Block a user