Code Diff
Edits the agent proposes, shown as line-level diffs the user can keep or undo per file or all at once.
agentscodediff
Loading interactive preview
Loading interactive preview
Edits the agent proposes, shown as line-level diffs the user can keep or undo per file or all at once.
Edits the agent proposes, shown as line-level diffs the user can keep or undo per file or all at once.
One file's proposed edit as a line-numbered diff, switchable between unified and split views, with folded unchanged lines and Keep or Undo for the whole file.
Every file the agent touched in one list, with added, modified, and deleted markers, line counts, an expandable preview of each edit, and Keep or Undo per file or for the whole set.
Unlock everything with Supporter
The complete source and every other premium item unlock with Supporter.
src/auth/session.ts+6−2| @@ -1,4 +1,5 @@ | |||
| 1 | 1 | import { issue } from './issue'; | |
| 2 | 2 | import type { Token } from './token'; | |
| 3 | Added: | ||
| 4 | Added: const GRACE_MS = 30_000; | ||
| 3 | 5 | ||
| @@ -40,6 +42,8 @@ export async function refreshSession | |||
| 40 | 42 | export async function refreshSession(token: Token) { | |
| 41 | Removed: if (token.expiresAt < Date.now()) return null; | ||
| 43 | Added: const now = Date.now(); | ||
| 44 | Added: // Allow a short grace window so in-flight requests can still refresh. | ||
| 45 | Added: if (token.expiresAt + GRACE_MS <= now) return null; | ||
| 42 | 46 | return issue(token.userId); | |
| 43 | Removed: } | ||
| 47 | Added: } | ||
src/auth/session.ts+6−2| @@ -1,4 +1,5 @@ | |||
| 1 | 1 | import { issue } from './issue'; | |
| 2 | 2 | import type { Token } from './token'; | |
| 3 | Added: | ||
| 4 | Added: const GRACE_MS = 30_000; | ||
| 3 | 5 | ||
| @@ -40,6 +42,8 @@ export async function refreshSession | |||
| 40 | 42 | export async function refreshSession(token: Token) { | |
| 41 | Removed: if (token.expiresAt < Date.now()) return null; | ||
| 43 | Added: const now = Date.now(); | ||
| 44 | Added: // Allow a short grace window so in-flight requests can still refresh. | ||
| 45 | Added: if (token.expiresAt + GRACE_MS <= now) return null; | ||
| 42 | 46 | return issue(token.userId); | |
| 43 | Removed: } | ||
| 47 | Added: } | ||
4 files changed
+38−12· 4 to review