import { Badge } from '@/components/ui/badge' const sourceLabels: Record = { knowledge_item: '知识条目', solution: '解决方案', ticket: '历史工单', document: '文档' } type AppReferenceCardProps = { title: string sourceType: string content: string score: number sourceLabel?: string } export function AppReferenceCard({ title, sourceType, content, score, sourceLabel }: AppReferenceCardProps) { return (

{title}

{sourceLabels[sourceType] ?? sourceType} 匹配度 {Math.round(score * 100)}%

{content}

{sourceLabel ?

来源:{sourceLabel}

: null}
) }