From 579dccbdcec13c5622deadeb90f938d1dca8be3f Mon Sep 17 00:00:00 2001 From: ruitanglin Date: Fri, 6 Feb 2026 16:04:49 +0800 Subject: [PATCH] fix(citations): parse citations in reasoning content When only reasoning content exists (no main content), the citations block was not being parsed and removed. Now reasoning content also goes through parseCitations to hide the raw citations block. Co-authored-by: Cursor --- .../src/components/workspace/messages/message-list-item.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/workspace/messages/message-list-item.tsx b/frontend/src/components/workspace/messages/message-list-item.tsx index 51323a2..333b42a 100644 --- a/frontend/src/components/workspace/messages/message-list-item.tsx +++ b/frontend/src/components/workspace/messages/message-list-item.tsx @@ -165,10 +165,12 @@ function MessageContent_({ const reasoningContent = extractReasoningContentFromMessage(message); const rawContent = extractContentFromMessage(message); + // When only reasoning content exists (no main content), also parse citations if (!isLoading && reasoningContent && !rawContent) { + const { citations, cleanContent } = parseCitations(reasoningContent); return { - citations: [], - cleanContent: reasoningContent, + citations, + cleanContent, uploadedFiles: [], isLoadingCitations: false, };