mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-08-04 20:08:40 +00:00
Two related fixes in the reasoning extraction path of core/messages/utils.ts: 1. splitInlineReasoning's first pass stripped every closed <think>...</think> pair unconditionally, so a message that discusses the tag literally in markdown inline code (e.g. "Wrap your reasoning in `<think>...</think>`") had its code span hollowed out and the inner text shipped to the Reasoning panel. The streaming pass already guards backtick-adjacent openers; apply the same guard to the closed-pair pass so both passes agree on what counts as literal tag talk. 2. getAssistantTurnCopyData fell back to reasoning via `content ?? reasoning`, but extractContentFromMessage never returns null, so the fallback was dead code and a reasoning-only turn (e.g. stopped mid-thinking) rendered no copy button at all - inconsistent with getMessageCopyData, which does copy reasoning in that case. Use the same empty-string check it uses.