Notebook sourcesPro
The sources a notebook chat answers from, with select all and per source toggles.
On this page
ProChoose which sources the chat answers from.
Installation
Usage
import { NotebookSources } from "@/components/ui/chatcn/pro/notebook-sources"
<NotebookSources sources={sources} selected={selected} onSelectedChange={setSelected} onAdd={addSource} />Unselected sources stay in the notebook but drop out of answers. Processing and failed sources cannot be selected until they are ready, and failures say how to fix them.
Examples
States
ProNo sources yet and all selected.
Props
| Prop | Type | Notes |
|---|---|---|
sources | NotebookSource[] | { id, title, kind, status, meta?, error? } |
selected, onSelectedChange | string[] | Controlled selection |
onAdd | () => void | Adds the add source button |
Accessibility
- Real checkboxes with labels; select all shows the mixed state.