Source ingest

Pro

Add 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.

Markdown

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

TSX · The example above
"use client"

import { SourceIngest } from "@/components/source-ingest"

export default function Example() {
  return <SourceIngest className="max-w-md" onFiles={() => {}} onLink={() => {}} onText={() => {}} />
}

<SourceIngest>

PropTypeDefaultDescription
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.
acceptstring | undefined".pdf,.docx,.md,.txt,.csv,.xlsx"File types the picker offers, as in the input accept attribute.
classNamestring | 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.

KeyEnglish
labelAdd knowledge
addFromAdd from
filesFiles
linkLink
textText
dropDrop process docs, architecture notes or spreadsheets
fileTypesPDF, Word, Markdown, text, CSV or Excel
chooseFilesChoose files
addLinkAdd link
pastedTextPasted text
titlePlaceholderTitle, e.g. Q4 territory rules
titleTitle
textPlaceholderPaste notes, a process description, a decision…
addTextAdd text