import { Space, Tag, Typography } from 'antd'; import type { ConsultationContextEvidence, ConsultationValue, DemandAnalysis } from '../types'; export const consultationLabels: Record = { yes: '有咨询意向', no: '无咨询意向', unclear: '咨询信息不足' }; const leadLabels = { retain_for_review: '保留待核实', not_selected: '暂不保留', insufficient: '信息不足' }; export function ConsultationBackground({ values, sources }: { values?: ConsultationContextEvidence[]; sources: DemandAnalysis['sources'] }) { return

笔记背景依据

{values?.length ? values.map((item, index) => { const note = sources.find(source => source.source_ref === item.source_ref && source.kind === 'note'); return
来源:本次已保存的笔记正文{note ? item.evidence.map((quote, quoteIndex) => 「{quote}」) : 背景来源未取得,不补推断。}
; }) : 未引用笔记背景依据。}
; } export function ConsultationDetails({ result, sources }: { result: DemandAnalysis['results'][number]; sources: DemandAnalysis['sources'] }) { return
咨询意向{result.consultation ? consultationLabels[result.consultation.value] : '历史未记录'}线索保留{result.lead_disposition ? leadLabels[result.lead_disposition] : '历史未记录'} {result.consultation && <>本条咨询依据:{result.consultation.evidence.length ? result.consultation.evidence.map((quote, index) => 「{quote}」{index + 1 < result.consultation!.evidence.length ? ';' : ''}) : '未提供本条逐字依据'}} 咨询意向、自身装修需求和业务匹配分别判断;保留待核实不代表需求、身份或地区已确认。笔记背景只解释咨询对象,不作为评论者自身项目事实。
; }