import type { ToolCallMessagePartProps } from "@assistant-ui/react"; import { WrenchScrewdriverIcon } from "@heroicons/react/24/outline"; export default function ToolFallback(props: ToolCallMessagePartProps) { const { toolName, args, result } = props; return (
tool {toolName}
          {formatJson(args)}
        
{result !== undefined && (
            {formatJson(result)}
          
)}
); } function Section({ label, children }: { label: string; children: React.ReactNode }) { return (
{label}
{children}
); } function formatJson(value: unknown): string { try { return JSON.stringify(value, null, 2); } catch { return String(value); } }