From f8e4fe05b257bf043488f4942210bd94b04fcd84 Mon Sep 17 00:00:00 2001 From: LofiSu Date: Mon, 9 Feb 2026 22:57:54 +0800 Subject: [PATCH] Strip citation prefix in citation badges --- .../src/components/workspace/citations/citation-link.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/workspace/citations/citation-link.tsx b/frontend/src/components/workspace/citations/citation-link.tsx index 72894e2..6aab8c2 100644 --- a/frontend/src/components/workspace/citations/citation-link.tsx +++ b/frontend/src/components/workspace/citations/citation-link.tsx @@ -17,7 +17,10 @@ export function CitationLink({ const domain = extractDomain(href ?? ""); // Priority: children > domain - const childrenText = typeof children === "string" ? children : null; + const childrenText = + typeof children === "string" + ? children.replace(/^citation:\s*/i, "") + : null; const isGenericText = childrenText === "Source" || childrenText === "来源"; const displayText = (!isGenericText && childrenText) ?? domain;