import { parsePatch } from "@/lib/diff"; const lineStyles = { add: "bg-add-bg text-add", del: "bg-del-bg text-del", ctx: "text-fog", hunk: "bg-raise text-frost/80", } as const; export default function Diff({ patch }: { patch: string }) { const { stat, files } = parsePatch(patch); return (
{stat}
)}
{files.map((f) => (
binary file changed
) : (| {l.old ?? ""} | {l.new ?? ""} | {l.kind === "add" ? "+" : l.kind === "del" ? "−" : ""} | {l.kind === "hunk" ? l.text : l.text || " "} |