import React from 'react'; import { Box } from 'ink'; import { IndividualToolCallDisplay, ToolCallStatus } from '../../types.js'; import ToolMessage from './ToolMessage.js'; import { PartListUnion } from '@google/genai'; import ToolConfirmationMessage from './ToolConfirmationMessage.js'; interface ToolGroupMessageProps { toolCalls: IndividualToolCallDisplay[]; onSubmit: (value: PartListUnion) => void; } // Main component renders the border and maps the tools using ToolMessage const ToolGroupMessage: React.FC = ({ toolCalls, onSubmit }) => { const hasPending = toolCalls.some(t => t.status === ToolCallStatus.Pending); const borderColor = hasPending ? "yellow" : "blue"; return ( {toolCalls.map((tool) => { return ( {tool.status === ToolCallStatus.Confirming && tool.confirmationDetails && ( )} ); })} {/* Optional: Add padding below the last item if needed, though ToolMessage already has some vertical space implicitly */} {/* {tools.length > 0 && } */} ); }; export default ToolGroupMessage;