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:
parent
e8ee19821d
commit
50ced32722
|
|
@ -121,7 +121,7 @@ export function MessageGroup({
|
||||||
key={step.id}
|
key={step.id}
|
||||||
label={
|
label={
|
||||||
<MessageResponse remarkPlugins={streamdownPlugins.remarkPlugins} rehypePlugins={rehypePlugins}>
|
<MessageResponse remarkPlugins={streamdownPlugins.remarkPlugins} rehypePlugins={rehypePlugins}>
|
||||||
{step.reasoning ?? ""}
|
{parseCitations(step.reasoning ?? "").cleanContent}
|
||||||
</MessageResponse>
|
</MessageResponse>
|
||||||
}
|
}
|
||||||
></ChainOfThoughtStep>
|
></ChainOfThoughtStep>
|
||||||
|
|
@ -171,7 +171,7 @@ export function MessageGroup({
|
||||||
key={lastReasoningStep.id}
|
key={lastReasoningStep.id}
|
||||||
label={
|
label={
|
||||||
<MessageResponse remarkPlugins={streamdownPlugins.remarkPlugins} rehypePlugins={rehypePlugins}>
|
<MessageResponse remarkPlugins={streamdownPlugins.remarkPlugins} rehypePlugins={rehypePlugins}>
|
||||||
{lastReasoningStep.reasoning ?? ""}
|
{parseCitations(lastReasoningStep.reasoning ?? "").cleanContent}
|
||||||
</MessageResponse>
|
</MessageResponse>
|
||||||
}
|
}
|
||||||
></ChainOfThoughtStep>
|
></ChainOfThoughtStep>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue