Skip to content
Sign in
KnowledgeNotebook sourcesMenu

Notebook sourcesPro

The sources a notebook chat answers from, with select all and per source toggles.

ProChoose which sources the chat answers from.

Installation

$ pnpm dlx shadcn@latest add @chatcn-pro/notebook-sources

Usage

tsx
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

PropTypeNotes
sourcesNotebookSource[]{ id, title, kind, status, meta?, error? }
selected, onSelectedChangestring[]Controlled selection
onAdd() => voidAdds the add source button

Accessibility

  • Real checkboxes with labels; select all shows the mixed state.