AI-18AIUpdated, November 16, 2026
AI Diff Review
A coding agent's edits streaming in file by file, then reviewed per file with accept, reject and undo.
PROSlash Command Menu and more like it are in Kokonut UI Pro
Installation
AI Diff Review is a free, open-source React component in the Kokonut UI AI collection. Add it with the shadcn CLI, which copies the source into components/kokonutui/ai-diff-review.tsx, so the code is yours to change.
npx shadcn@latest add @kokonutui/ai-diff-reviewOr add it by hand: install its packages, then copy the source from Copy code above into components/kokonutui/ai-diff-review.tsx.
npm install lucide-react motionUsage
import AIDiffReview from "@/components/kokonutui/ai-diff-review";
export default function Example() {
return <AIDiffReview />;
}Props
filesFileChange[]The agent's edits. When omitted, a demo edit streams in, file by file, then waits for review.
onDecision(path: string, decision: FileDecision) => voidCalled when a file is accepted, rejected or put back to pending.
classNamestringExtra classes for the root element.
FileChange
pathrequiredstringhunksrequiredDiffHunk[]createdbooleanTrue for a file the agent created.
FileDecision
type FileDecision = "pending" | "accepted" | "rejected";DiffHunk
startrequirednumberFirst line number of the hunk in the new file.
linesrequiredDiffLine[]DiffLine
typerequired"add" | "remove" | "context"textrequiredstringDependencies
| Needs | Version | Comes from |
|---|---|---|
lucide-react | ^0.556.0 | npm, installed by the CLI |
motion | ^12.23.25 | npm, installed by the CLI |
cn from lib/utils.ts | shadcn init | |
| React | 19 | Your app |
| Tailwind CSS | 4 | Your app |
No provider, font or global CSS to set up: the file works as soon as it lands.

