Python 64.6%
TypeScript 33.7%
CSS 0.8%
1import type { ToolCallView } from '@/lib/types';23interface Sheet { name: string; rows: number; cols: number; columns: string[]; head: string[][] }45export function FileAnalysisCard({ call }: { call: ToolCallView }) {6 const p = call.payload as { filename?: string; kind?: string; preview?: { sheets?: Sheet[]; pages?: number; text_pages?: number }; summary?: string };7 const sheets = p.preview?.sheets || [];8 return (9 <div className="space-y-2 text-sm">10 <div className="text-neutral-muted">{p.filename} · {p.kind}{p.preview?.pages ? ` · ${p.preview.pages} pages` : ''}</div>11 {sheets.map((s) => (12 <div key={s.name} className="rounded-lg border border-neutral-line overflow-x-auto scroll-thin bg-white">13 <div className="px-2 py-1 text-xs font-medium bg-uqo-blue-light text-uqo-blue-dark">{s.name} — {s.rows} lignes × {s.cols} colonnes</div>14 <table className="text-xs min-w-full">15 <thead><tr>{s.columns.map((c) => <th key={c} className="px-2 py-1 text-left font-semibold whitespace-nowrap">{c}</th>)}</tr></thead>16 <tbody>{s.head.map((r, i) => <tr key={i} className="border-t border-neutral-line/70">{r.slice(0, s.columns.length).map((c, j) => <td key={j} className="px-2 py-1 whitespace-nowrap">{c}</td>)}</tr>)}</tbody>17 </table>18 </div>19 ))}20 {!sheets.length && p.summary && <p className="text-xs text-neutral-text/80 whitespace-pre-wrap line-clamp-6">{p.summary}</p>}21 </div>22 );23}24