Kanshō

Docs / Memory and context /

MemoryLayerOverview

Overview of memory layers (working, long-term, shared) with item counts and storage use.

Preview

Variants

Read-only (no onSelect)

  • Conversation4

    This thread only — cleared when it ends.

    retention until thread ends
  • Session11

    The current working session across threads.

    retention 24h2 awaiting promotion
  • User38

    Durable facts about this user.

    retention permanent

Props

PropTypeDescription
layers*MemoryLayerStat[]Stats for each layer to display: factCount, retention, and optional note.
selectedLayerMemoryLayer | nullWhich layer is currently selected (highlights the tile).
onSelect(layer: MemoryLayer) => voidCalled when the user clicks a layer tile. Omit for a read-only view.
classNamestringAdditional CSS classes for the grid wrapper.

* required.

Usage

import { MemoryLayerOverview } from "@/components/memory/memory-layer-overview";
import type { MemoryLayerStat } from "@/components/memory/memory-layer-overview";

const [selectedLayer, setSelectedLayer] = React.useState(null);

<MemoryLayerOverview
  layers={layerStats}
  selectedLayer={selectedLayer}
  onSelect={setSelectedLayer}
/>