Remove corpus counts from chat chrome

This commit is contained in:
2026-08-10 17:26:58 +07:00
parent 46469468bb
commit 97cb6d16f4
31 changed files with 2192 additions and 424 deletions
+5 -1
View File
@@ -40,6 +40,10 @@ const SECTION_LABELS: Record<string, string> = {
thong_tin_quy_che: "Thông tin quy chế",
};
export function citationSectionLabel(sectionType: string): string {
return SECTION_LABELS[sectionType] ?? (sectionType.replace(/_/g, " ") || "Chuyên luận");
}
export function CitationCard({
citation,
index,
@@ -47,7 +51,7 @@ export function CitationCard({
onSelect,
className,
}: CitationCardProps) {
const sectionLabel = SECTION_LABELS[citation.sectionType] ?? citation.sectionType ?? "Chuyên luận";
const sectionLabel = citationSectionLabel(citation.sectionType);
const pageRangeText = citation.sourcePageRange
? `Trang ${citation.sourcePageRange[0]}${
citation.sourcePageRange[1] && citation.sourcePageRange[1] !== citation.sourcePageRange[0]