"use client"; import { CheckIcon, Loader2Icon } from "lucide-react"; import type { AssistantPhase, SearchStep } from "../lib/askConversation"; // The retrieval→answer feedback, shown while a turn is in flight (before the // first answer token). A restrained terminal-flavoured trace: each search the // model runs appears as its own row — a spinner while running, a check with the // match count when done — so multi-step "search, read, search again" is visible. // Once the answer starts streaming this returns null and the text takes over. export function PipelineStatus({ phase, steps, }: { phase?: AssistantPhase; steps: SearchStep[]; }) { if (phase !== "gathering" && phase !== "answering") return null; const thinking = phase === "gathering" && steps.length === 0; return (