"use client"; import { motion } from "framer-motion"; type NodeState = "complete" | "active" | "pending"; interface PipelineNode { icon: string; label: string; state: NodeState; } interface PipelineStage { group: string; nodes: PipelineNode[]; } const stages: PipelineStage[] = [ { group: "Analysts", nodes: [ { icon: "\u{1F4CA}", label: "Market", state: "complete" }, { icon: "\u{1F4CB}", label: "Fundamentals", state: "complete" }, { icon: "\u{1F4F0}", label: "News", state: "complete" }, { icon: "\u{1F4AC}", label: "Social", state: "complete" }, ], }, { group: "Debate", nodes: [ { icon: "\u{1F402}", label: "Bull", state: "active" }, { icon: "\u{1F43B}", label: "Bear", state: "active" }, { icon: "\u2696\uFE0F", label: "Judge", state: "pending" }, ], }, { group: "Execution", nodes: [{ icon: "\u{1F4B9}", label: "Trader", state: "pending" }], }, { group: "Risk", nodes: [ { icon: "\u{1F525}", label: "Aggressive", state: "pending" }, { icon: "\u{1F6E1}\uFE0F", label: "Conservative", state: "pending" }, { icon: "\u2696\uFE0F", label: "Neutral", state: "pending" }, { icon: "\u{1F3DB}\uFE0F", label: "Risk Judge", state: "pending" }, ], }, ]; function NodeIcon({ node }: { node: PipelineNode }) { const stateClasses: Record = { complete: "bg-green-dim border-green", active: "bg-amber-dim border-amber", pending: "bg-bg-elevated border-border-medium", }; return (
{node.icon}
{node.label}
); } function Connector({ active }: { active: boolean }) { return (
{active && (
)}
); } export default function AgentPipeline() { return ( {stages.map((stage, si) => (
{si > 0 && (
n.state === "complete") ? "bg-gradient-to-r from-amber to-amber-dim h-0.5 shadow-[0_0_8px_var(--amber-dim)]" : "bg-border-medium" }`} style={{ width: 40 }} />
)}
{stage.group} {stage.nodes.map((node, ni) => (
{ni > 0 && ( )}
))}
))} ); }