# MemoryControls

See what the assistant remembers, and ask to correct or delete it.

- **Use it for**: Asking to correct or delete one saved memory, with the state of each request.
- **Not for**: Browsing, filtering or pinning memories with where they came from. Try [MemoryPanel](https://unseenui.com/components/memory-panel/).

## Installation

```bash
npm install @stackunseen/ui
```

## Usage

```tsx
import { MemoryControls } from '@stackunseen/ui';
import '@stackunseen/ui/styles.css';

<MemoryControls variant="list" items={memories} onRequest={requestMemoryChange} />
```

## All props

| Prop | Type | Description |
| --- | --- | --- |
| `className` | `string` | Added to the root element, after the component's own classes. |
| `items` (required) | `readonly MemoryRecord[]` | A host-owned window of up to 100 entries. |
| `onRequest` (required) | `(item: MemoryRecord, action: "correct" \| "delete") => void` |  |
| `variant` | `"list" \| "cards" \| "compact"` |  |

## Keyboard

Tab reaches controls; Enter or Space activates buttons. Accordions use arrow keys, Home and End. Select menus support arrows and typeahead; Escape closes menus and dialogs and restores focus.

## Works with

[MentionPicker](https://unseenui.com/components/mention-picker/), [ContextInspector](https://unseenui.com/components/context-inspector/), [ContextBar](https://unseenui.com/components/context-bar/), [MemoryPanel](https://unseenui.com/components/memory-panel/)

Page: https://unseenui.com/components/memory-controls/
