Skip to Content
Kokonut UI

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.

Install with
lucide-react, motion

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-review

Or 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 motion

Usage

import AIDiffReview from "@/components/kokonutui/ai-diff-review";

export default function Example() {
  return <AIDiffReview />;
}

Props

files
FileChange[]

The agent's edits. When omitted, a demo edit streams in, file by file, then waits for review.

onDecision
(path: string, decision: FileDecision) => void

Called when a file is accepted, rejected or put back to pending.

className
string

Extra classes for the root element.

FileChange

pathrequired
string
hunksrequired
DiffHunk[]
created
boolean

True for a file the agent created.

FileDecision

type FileDecision = "pending" | "accepted" | "rejected";

DiffHunk

startrequired
number

First line number of the hunk in the new file.

linesrequired
DiffLine[]

DiffLine

typerequired
"add" | "remove" | "context"
textrequired
string

Dependencies

NeedsVersionComes from
lucide-react^0.556.0npm, installed by the CLI
motion^12.23.25npm, installed by the CLI
cn from lib/utils.tsshadcn init
React19Your app
Tailwind CSS4Your app

No provider, font or global CSS to set up: the file works as soon as it lands.