mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-05-24 08:55:59 +00:00
fix: avoid duplicate call to extractReasoningContentFromMessage (#2661)
In convertToSteps(), the extractReasoningContentFromMessage function was called twice for the same message - once to check if reasoning exists and again to assign it to the step object. Reuse the already-extracted value from the local variable instead.
This commit is contained in:
@@ -451,7 +451,7 @@ function convertToSteps(messages: Message[]): CoTStep[] {
|
|||||||
id: message.id,
|
id: message.id,
|
||||||
messageId: message.id,
|
messageId: message.id,
|
||||||
type: "reasoning",
|
type: "reasoning",
|
||||||
reasoning: extractReasoningContentFromMessage(message),
|
reasoning,
|
||||||
};
|
};
|
||||||
steps.push(step);
|
steps.push(step);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user