# ContextInspector

Lists what a request selected, included, excluded or truncated.

- **Use it for**: What a request selected, included, excluded or truncated.
- **Not for**: A compact strip above the composer. Try [ContextBar](https://unseenui.com/components/context-bar/).

## Installation

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

## Usage

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

<ContextInspector variant="list" value={contextSnapshot} onRefresh={refreshContext} />
```

## All props

| Prop | Type | Description |
| --- | --- | --- |
| `className` | `string` | Added to the root element, after the component's own classes. |
| `error` | `string` |  |
| `loading` | `boolean` |  |
| `onRefresh` | `(() => void)` |  |
| `value` (required) | `ContextInspection` |  |
| `variant` | `"table" \| "list" \| "accordion"` |  |

## 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/), [MemoryControls](https://unseenui.com/components/memory-controls/), [ContextBar](https://unseenui.com/components/context-bar/), [MemoryPanel](https://unseenui.com/components/memory-panel/)

Page: https://unseenui.com/components/context-inspector/
