Show model in history (#13034)

This commit is contained in:
Tommaso Sciortino
2025-11-13 19:11:06 -08:00
committed by GitHub
parent 0fcbff506e
commit ab11b2c27f
10 changed files with 96 additions and 6 deletions

View File

@@ -30,6 +30,7 @@ import { getMCPServerStatus } from '@google/gemini-cli-core';
import { ToolsList } from './views/ToolsList.js';
import { McpStatus } from './views/McpStatus.js';
import { ChatList } from './views/ChatList.js';
import { ModelMessage } from './messages/ModelMessage.js';
interface HistoryItemDisplayProps {
item: HistoryItem;
@@ -117,6 +118,9 @@ export const HistoryItemDisplay: React.FC<HistoryItemDisplayProps> = ({
)}
{itemForDisplay.type === 'model_stats' && <ModelStatsDisplay />}
{itemForDisplay.type === 'tool_stats' && <ToolStatsDisplay />}
{itemForDisplay.type === 'model' && (
<ModelMessage model={itemForDisplay.model} />
)}
{itemForDisplay.type === 'quit' && (
<SessionSummaryDisplay duration={itemForDisplay.duration} />
)}

View File

@@ -0,0 +1,21 @@
/**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import type React from 'react';
import { Text, Box } from 'ink';
import { theme } from '../../semantic-colors.js';
interface ModelMessageProps {
model: string;
}
export const ModelMessage: React.FC<ModelMessageProps> = ({ model }) => (
<Box marginLeft={3}>
<Text color={theme.ui.comment} italic>
responding with {model}
</Text>
</Box>
);