import React from 'react'; import ClockIcon from '@/components/icons/ClockIcon'; import { RealtimeToolCallItem } from '@openai/agents/realtime'; import FunctionsIcon from '@/components/icons/FunctionsIcon'; type FunctionCallMessageProps = { message: RealtimeToolCallItem; }; export function FunctionCallMessage({ message }: FunctionCallMessageProps) { let output = message?.output; try { if (message.output) { output = JSON.stringify(JSON.parse(message.output), null, 2); } } catch { output = message.output; } return (
{JSON.stringify(JSON.parse(message.arguments), null, 2)}
{output}
) : (