1 variant
Diff Review
A coding agent's edit to one file as a diff to accept or reject, with line numbers, added and removed counts, and code that folds away once decided.
| export async function GET(request: Request) { | |||
| 12 | 12 | const { searchParams } = new URL(request.url); | |
| 13 | - | const page = searchParams.get("page"); | |
| 14 | - | const items = await db.item.findMany(); | |
| 13 | + | const page = Number(searchParams.get("page") ?? 1); | |
| 14 | + | const items = await db.item.findMany({ | |
| 15 | + | take: PAGE_SIZE, | |
| 16 | + | skip: (page - 1) * PAGE_SIZE, | |
| 17 | + | }); | |
| 15 | 18 | ||
| 16 | 19 | return Response.json({ items, page }); | |
| 17 | 20 | } |
import { DiffReview } from "@/components/registry/diff-review";
export function ProposedEdit({ patch }: { patch: string }) {
return (
<DiffReview
path="app/api/items/route.ts"
diff={patch}
onDecision={(decision) => apply(decision)}
/>
);
}161 more lines ship with an easeUI Pro license.
Buy a licenseInstall
$ bunx --bun shadcn add @easeui-pro/diff-review