import { Download, Share2 } from 'lucide-react'; import type { ToolCallView } from '@/lib/types'; import { downloadFile, shareFile } from '@/lib/api'; export function ChartCard({ call }: { call: ToolCallView }) { const p = call.payload as { title?: string; type?: string; file_id?: string; filename?: string }; const fileId = p.file_id || call.artifacts?.[0]?.file_id; if (!fileId) return

{call.summary}

; return (
{p.title
{p.title || p.filename} ยท {p.type} {typeof navigator !== 'undefined' && !!navigator.share && }
); }