Kanshō

Docs / Memory and context /

MemoryConflictResolver

UI for resolving a conflict between two versions of a memory entry.

Preview

ConflictedTwo facts disagree
Active (old)85% conf

User's primary language is Dutch (Belgium, native speaker).

conversation msg-22 · 20 May 202620 May 2026 · 10:14
Candidate (new)77% conf

User speaks Dutch and English fluently; works primarily in English.

conversation msg-811 · 15 Jun 202615 Jun 2026 · 16:32

Variants

No resolution controls (read-only)

ConflictedTwo facts disagree
Active (old)85% conf

User's primary language is Dutch (Belgium, native speaker).

conversation msg-22 · 20 May 202620 May 2026 · 10:14
Candidate (new)77% conf

User speaks Dutch and English fluently; works primarily in English.

conversation msg-811 · 15 Jun 202615 Jun 2026 · 16:32

Props

PropTypeDescription
existing*ConflictSideThe currently active fact — shown on the left as the "old" version.
incoming*ConflictSideThe incoming candidate fact that conflicts — shown on the right as "new".
onResolve(resolution: ConflictResolution) => voidCalled with "keep-both", "merge", or "delete-old" when the user picks a resolution. Omit to hide controls.
classNamestringAdditional CSS classes for the section root.

* required.

Usage

import { MemoryConflictResolver } from "@/components/memory/memory-conflict-resolver";

<MemoryConflictResolver
  existing={{
    fact: "User speaks Dutch (native).",
    confidence: 0.85,
    source: "msg-22 · 20 May 2026",
    timestamp: "20 May 2026",
  }}
  incoming={{
    fact: "User speaks Dutch and English fluently.",
    confidence: 0.77,
    source: "msg-811 · 15 Jun 2026",
    timestamp: "15 Jun 2026",
  }}
  onResolve={(resolution) => console.log(resolution)}
/>