import { cn } from "@/lib/utils"; import type { AiDiffTab, Tab } from "@/modules/tabs"; import { AiDiffPane } from "./AiDiffPane"; type Props = { tabs: Tab[]; activeId: number; onAccept: (approvalId: string) => void; onReject: (approvalId: string) => void; }; export function AiDiffStack({ tabs, activeId, onAccept, onReject }: Props) { const diffs = tabs.filter((t): t is AiDiffTab => t.kind === "ai-diff"); if (diffs.length === 0) return null; return (
{diffs.map((t) => { const visible = t.id === activeId; return (
onAccept(t.approvalId)} onReject={() => onReject(t.approvalId)} />
); })}
); }