Memory
import { MemoryPanel, MemoryGraph } from "@arcadia/ui";Memory
MemoryPanel
memoriesrequired- readonly MemoryItem[]
- What it remembers, in the product's order; the panel groups them by category.
title- string
- Default:
"Memory" - The panel's name.
variant- "default" | "compact"
- Default:
"default" compact: the Profile's denser form, with no filters, no bar and no count, and the view toggle in the header.agent- MemoryAgentNode
- The agent whose memory it is: with it the panel offers the graph, and the graph draws it.
sources- readonly MemorySourceNode[]
- The tools and sources the agent can reach: the graph's right arc.
recalling- readonly string[]
- Real events: the ids of the memories it is recalling now.
learning- readonly string[]
- Real events: the ids of the memories it is learning now.
using- readonly string[]
- Real events: the ids of the sources it is using now.
enabled- boolean
- The master switch, controlled.
defaultEnabled- boolean
- Default:
true - Its state when uncontrolled.
onEnabledChange- (enabled: boolean) => void
showEnabledSwitch- boolean
- Default:
true false: no master switch, so a host draws its own scope controls. One shows when the panel is told the state or what to do with a change.view- "list" | "graph"
- The view, controlled.
defaultView- "list" | "graph"
- Default:
"list" - The view it opens on when uncontrolled.
onViewChange- (view: MemoryViewMode) => void
views- readonly MemoryViewMode[]
- The views the toggle offers. Default: the list, and the graph when
agentis given. loading- boolean
- Default:
false - The memories are still being read.
error- ReactNode
- Why they could not be read.
onEdit- (id: string, text: string) => void
- A memory's text was edited in place and kept.
onRequestEdit- (memory: MemoryItem) => void
- Edit runs the host's own flow (a dialog with a scope choice) instead of the field in the row.
onPause- (id: string, paused: boolean) => void
onForget- (id: string) => void
onRestore- (memory: MemoryItem) => void
- Undo puts a forgotten memory back.
undoFor- number
- Default:
5000 - How long the undo stands, in ms.
onAdd- () => void
onRequestAdd- () => void
- New memory runs the host's own flow instead of a plain add.
headerExtra- ReactNode
- One control at the header's end, beside the master switch.
controls- ReactNode
- Controls in the panel's bar, beside the view toggle.
readOnly- boolean
- Default:
false - No edit, pause, forget or add: a reader's view.
now- number
- The clock relative dates count from. A server-rendered surface must pass a fixed value, so its markup matches the browser's first render.
filters- boolean
- Default:
true - The category filters, shown when there are two categories or more. And false in a compact panel unless a host asks for them.
search- "field" | "icon"
- Default:
"field" - The search: the field under the filters, or a glyph in the bar that opens it.
footer- boolean
- Default:
false - The count in a quiet footer under the list, instead of beside the title.
addPlacement- "bar" | "list-end"
- Default:
"bar" - Where New memory stands: in the bar, or as the list's last row.
fit- boolean
- Default:
false - The ring as tall as what it holds, under its maximum.
rootStyle- MemoryPanelStyle
agentrequired- MemoryAgentNode
- The agent in the middle: its mark, its name, and what it is doing where no real event says.
memoriesrequired- readonly MemoryItem[]
- What it remembers, on the left arc; six slots, filled from the middle out, the rest behind +N more.
sources- readonly MemorySourceNode[]
- Default:
NO_SOURCES - The tools and sources it can reach, on the right arc.
recalling- readonly string[]
- Default:
NO_IDS - Memories it is recalling now: only their connectors light.
learning- readonly string[]
- Default:
NO_IDS - Memories it is learning now: only their connectors light.
using- readonly string[]
- Default:
NO_IDS - Sources it is using now: only their connectors light.
now- number
- The clock relative dates count from. A server-rendered surface must pass a fixed value, so its markup matches the browser's first render.
onEdit- (id: string, text: string) => void
onRequestEdit- (memory: MemoryItem) => void
onPause- (id: string, paused: boolean) => void
onForget- (id: string) => void
onToggleSource- (id: string, enabled: boolean) => void
readOnly- boolean
- Default:
false - No Edit, Pause, Forget or source toggle: a reader's view.
fit- boolean
- Default:
false - As tall as what it holds, under its maximum: the used slots and the agent, without the empty ring.
rootStyle- MemoryGraphStyle
- Typed StyleX override: where it sits and its height.
State machine
Memory