import type { ToolCallView } from '@/lib/types'; interface Sheet { name: string; rows: number; cols: number; columns: string[]; head: string[][] } export function FileAnalysisCard({ call }: { call: ToolCallView }) { const p = call.payload as { filename?: string; kind?: string; preview?: { sheets?: Sheet[]; pages?: number; text_pages?: number }; summary?: string }; const sheets = p.preview?.sheets || []; return (
{p.filename} · {p.kind}{p.preview?.pages ? ` · ${p.preview.pages} pages` : ''}
{sheets.map((s) => (
{s.name} — {s.rows} lignes × {s.cols} colonnes
{s.columns.map((c) => )}{s.head.map((r, i) => {r.slice(0, s.columns.length).map((c, j) => )})}
{c}
{c}
))} {!sheets.length && p.summary &&

{p.summary}

}
); }