mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-19 12:24:46 +08:00
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:
@@ -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>
|
||||||
|
|||||||
Reference in New Issue
Block a user