import React from 'react' import { CheckCircle, Loader2, Circle } from 'lucide-react' export interface PipelineProgressProps { currentStep: number } const STAGES = [ { label: 'Extracting keywords...', index: 1 }, { label: 'Retrieving documents...', index: 2 }, { label: 'Filtering relevance...', index: 3 }, { label: 'Generating answer...', index: 4 }, ] export const PipelineProgress: React.FC = ({ currentStep }) => { if (currentStep === 0) { return null } return (
{STAGES.map((stage, index) => { const stageNumber = index + 1 const isCompleted = currentStep >= stageNumber && (currentStep === STAGES.length || currentStep > stageNumber) const isActive = currentStep === stageNumber && currentStep !== STAGES.length const isPending = currentStep < stageNumber && currentStep !== STAGES.length return (
{index < STAGES.length - 1 && (
)}
{isCompleted && ( )} {isActive && ( )} {isPending && ( )}
{stage.label}
) })}
) }