An agent proposes a change and you review it where it stands. What it takes out and puts in, the exact words that moved, and an Accept or Keep on every part, each with an undo.
Here is the fix for the logouts. Have a look before I save it.
Lines around each change
Review
NeedsReactFramer MotionTheme
Sourcenpm install framer-motion && curl --create-dirs -o src/components/diff.tsx https://fragms.simonveprek.cz/source/diff -o src/components/theme.tsx https://fragms.simonveprek.cz/source/themeSaves src/components/diff.tsx and theme.tsx beside it after installing what it needs. No setup, works in any React project.
import { Diff } from "@/components/diff";<Diff file="src/auth/session.ts" before={current} after={proposed} onResolve={(merged) => saveFile(merged)}/>
beforeThe text as it is now.
stringDefault requiredafterThe text the agent proposes. What changed is worked out for you.
stringDefault requiredfileThe file's path or name, over the changes.
stringDefault Proposed changecontextUnchanged lines kept around each change. The rest fold to a count.
numberDefault 2reviewAccept and Keep on every change. Off, it is a plain diff to read.
truefalseonChangeCalled on every decision, with the text as decided so far.
(merged, decisions) => voidDefault noneonResolveCalled once every change has a decision, with the final text.
(merged, decisions) => voidDefault nonecolorThe colour of Accept.
stringDefault the theme's accentWhat's new
- 2.1
- First release. Review an agent's change, line by line
- The exact words that changed are marked inside each line