import { useState } from 'react'; import type { ScoredChunk } from '../types'; import { InfoTooltip } from './PipelineView'; interface SearchColumnState { status: 'idle' | 'running' | 'done'; data?: { bm25Hits: ScoredChunk[]; vectorHits: ScoredChunk[] }; } interface SearchColumnProps { state: SearchColumnState; accent: string; info: string; } function Spinner({ color }: { color: string }) { return ( ); } function ScoreBadge({ score, source }: { score: number; source: 'bm25' | 'vector' }) { const label = source === 'bm25' ? score.toFixed(2) : (score * 100).toFixed(1) + '%'; return ( {label} ); } function HitRow({ hit }: { hit: ScoredChunk }) { const [open, setOpen] = useState(false); return (
Awaiting expansion...
)} {isRunning && (Running vector + BM25 search...
)} {isDone && state.data && ( <>