import { ArrowRight, BookOpenCheck, ChevronDown, ChevronUp, FileText, GitBranch } from "lucide-react"; import { Handle, Position, type NodeProps } from "@xyflow/react"; import type { CanvasNodeData } from "@/lib/layout"; import { SourceNoticeBadge, StatusBadge } from "@/components/ui/Badges"; import { SourceComparisonButton } from "@/components/flow/SourceComparisonButton"; export function CandidateCard({ data }: NodeProps) { const { item, onOpen, onToggleBranch } = data as unknown as CanvasNodeData; if (!item || item.itemType !== "branch-summary") return null; const summary = item.branch.summary; return
{ if (event.key === "Enter" || event.key === " ") { event.preventDefault(); onOpen(item, "business"); } }}>
{item.branch.pathType === "领域信息" ? : }实现 Agent · 方案 {item.branchId} · {item.branch.pathType === "unknown" ? "类型未记录" : item.branch.pathType}
{item.branch.title !== `方案 ${item.branchId}` ?

{item.branch.title}

: null}
{item.detailRef ? : null} {item.branch.output.type === "script-artifact" && item.branch.output.snapshotRef ? : null}
; } function SummaryRow({ label, value }: { label: string; value?: string | null }) { return
{label}

{value || "未记录"}

; }