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.

src/auth/session.ts+6−4
2 unchanged lines
3 export async function refresh(token: Token) {
4 if (isRefreshing) return token;
5− if (token.expiresAt > Date.now()) return token;
5+ if (token.expiresAt * 1000 > Date.now()) return token;
6
7 isRefreshing = true;
8− const next = await api.refresh(token.refreshToken);
9− isRefreshing = false;
10− return next;
8+ try {
9+ return await api.refresh(token.refreshToken);
10+ } finally {
11+ isRefreshing = false;
12+ }
13 }

Lines around each change

Review

NeedsReactFramer MotionTheme

Source
npm 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/theme

Saves 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)}/>
before

The text as it is now.

stringDefault required
after

The text the agent proposes. What changed is worked out for you.

stringDefault required
file

The file's path or name, over the changes.

stringDefault Proposed change
context

Unchanged lines kept around each change. The rest fold to a count.

numberDefault 2
review

Accept and Keep on every change. Off, it is a plain diff to read.

truefalse
onChange

Called on every decision, with the text as decided so far.

(merged, decisions) => voidDefault none
onResolve

Called once every change has a decision, with the final text.

(merged, decisions) => voidDefault none
color

The colour of Accept.

stringDefault the theme's accent

What's new

  1. 2.1
    • First release. Review an agent's change, line by line
    • The exact words that changed are marked inside each line