UNPKG

@promptbook/remote-server

Version:

Promptbook: Create persistent AI agents that turn your company's scattered knowledge into action

45 lines (44 loc) 1.22 kB
import type { ParsedCitation } from '../utils/parseCitationsFromContent'; /** * Props for SourceChip component */ export type SourceChipProps = { /** * Citation data to display */ citation: ParsedCitation; /** * Click handler */ onClick?: (citation: ParsedCitation) => void; /** * Additional CSS class name */ className?: string; /** * Optional suffix text to display after the citation label. */ suffix?: string; /** * Controls whether the technical citation id is shown inside the chip label. */ isCitationIdVisible?: boolean; }; /** * SourceChip component - displays a chip with source document information * * This component is used to display RAG source citations in chat messages. * It displays the source document name and citation ID. * * ```tsx * <SourceChip * citation={{ id: '5:13', source: 'document.pdf' }} * onClick={(citation) => console.log('clicked', citation)} * /> * ``` * * @example * * @private utility of `ChatMessageItem` component */ export declare function SourceChip({ citation, onClick, className, suffix, isCitationIdVisible }: SourceChipProps): import("react/jsx-runtime").JSX.Element;