Source ingest
ProAdd knowledge: drop files, paste a link, or paste text (meeting notes, a process description). What's added is read and shown in Sources; nothing here claims it was understood until the read finishes.
Preview
Install
With the Candor CLI
First time? Get started sets up the registry and theme. Or with shadcn directly: npx shadcn@latest add @candor/source-ingest
Brings in: button, input, locale, utils · npm: lucide-react@^1.67.0, radix-ui@^1.8.1
Usage
"use client"
import { SourceIngest } from "@/components/source-ingest"
export default function Example() {
return <SourceIngest className="max-w-md" onFiles={() => {}} onLink={() => {}} onText={() => {}} />
}<SourceIngest>
| Prop | Type | Default | Description |
|---|---|---|---|
| onFilesrequired | (files: File[]) => void | — | Called with the files a person dropped or chose. |
| onLinkrequired | (url: string) => void | — | Called with a pasted link when it's added. |
| onTextrequired | (title: string, text: string) => void | — | Called with the title and body of pasted text when it's added. |
| accept | string | undefined | ".pdf,.docx,.md,.txt,.csv,.xlsx" | File types the picker offers, as in the input accept attribute. |
| className | string | undefined | — | Extra classes for the outer element. |
Strings
The fixed words, in English by default. Change any of them under sourceIngest in <LocaleProvider strings={{ … }}>; the table is exported as sourceIngestStrings.
| Key | English |
|---|---|
| label | Add knowledge |
| addFrom | Add from |
| files | Files |
| link | Link |
| text | Text |
| drop | Drop process docs, architecture notes or spreadsheets |
| fileTypes | PDF, Word, Markdown, text, CSV or Excel |
| chooseFiles | Choose files |
| addLink | Add link |
| pastedText | Pasted text |
| titlePlaceholder | Title, e.g. Q4 territory rules |
| title | Title |
| textPlaceholder | Paste notes, a process description, a decision… |
| addText | Add text |