import React, { useState } from 'react' function ToolCall({ toolCall }) { const [expanded, setExpanded] = useState(false) return (
setExpanded(!expanded)} >
{toolCall.tool_name} {toolCall.success ? ( SUCCESS ) : ( FAILED )} {toolCall.execution_time_ms && ( {toolCall.execution_time_ms}ms )}
{expanded && (
Parameters
              {JSON.stringify(toolCall.parameters, null, 2)}
            
{toolCall.result && (
Result
                {JSON.stringify(toolCall.result, null, 2)}
              
)} {toolCall.error && (
Error
                {toolCall.error}
              
)}
)}
) } export default ToolCall