Kanshō

Docs / Memory and context /

MemoryDiffRollback

Side-by-side diff of a memory entry before and after a change, with rollback action.

Preview

Updatedcorrected by kansho-agent9 Jun 2026 · 14:07
Before

User is working on the authentication flow for the XFA dashboard.

After

User is building a public component library called kansho-ui.

Variants

Non-restorable

Updatedupdated by billing-agent14 Jun 2026 · 09:00
Before

Billing plan: Starter (free tier).

After

Billing plan: Pro — confirmed via Stripe webhook.

Props

PropTypeDescription
before*stringThe previous value of the memory fact, shown struck-through on the left.
after*stringThe current value after the update, shown on the right.
changedBy*stringAttribution string, e.g. "corrected by Alex" or "reinforced from R-1041".
timestamp*stringWhen the change occurred, shown in the header.
restorablebooleanWhether the restore button is enabled. Defaults to true.
onRestore() => voidCalled when the user clicks "Restore previous value".
classNamestringAdditional CSS classes for the section root.

* required.

Usage

import { MemoryDiffRollback } from "@/components/memory/memory-diff-rollback";

<MemoryDiffRollback
  before="User is working on the authentication flow."
  after="User is building a component library called kansho-ui."
  changedBy="corrected by kansho-agent"
  timestamp="9 Jun 2026 · 14:07"
  restorable
  onRestore={() => console.log("restored")}
/>