fix(citations): hide citations block in reasoning/thinking content

The reasoning content in message-group.tsx was not being processed
through parseCitations, causing raw <citations> blocks to be visible.
Now reasoning content is parsed to remove citations blocks.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
LofiSu
2026-02-06 16:12:43 +08:00
parent 582bfaee39
commit 5484233548

View File

@@ -121,7 +121,7 @@ export function MessageGroup({
key={step.id}
label={
<MessageResponse remarkPlugins={streamdownPlugins.remarkPlugins} rehypePlugins={rehypePlugins}>
{step.reasoning ?? ""}
{parseCitations(step.reasoning ?? "").cleanContent}
</MessageResponse>
}
></ChainOfThoughtStep>
@@ -171,7 +171,7 @@ export function MessageGroup({
key={lastReasoningStep.id}
label={
<MessageResponse remarkPlugins={streamdownPlugins.remarkPlugins} rehypePlugins={rehypePlugins}>
{lastReasoningStep.reasoning ?? ""}
{parseCitations(lastReasoningStep.reasoning ?? "").cleanContent}
</MessageResponse>
}
></ChainOfThoughtStep>