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 <cursoragent@cursor.com>
This commit is contained in:
ruitanglin 2026-02-06 16:04:49 +08:00
parent 97f16ff73a
commit 6e4a7f4f6c
1 changed files with 4 additions and 2 deletions

View File

@ -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,
};