mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-05-01 14:28:28 +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:
parent
08afdcb907
commit
24a5a00679
@ -451,7 +451,7 @@ function convertToSteps(messages: Message[]): CoTStep[] {
|
||||
id: message.id,
|
||||
messageId: message.id,
|
||||
type: "reasoning",
|
||||
reasoning: extractReasoningContentFromMessage(message),
|
||||
reasoning,
|
||||
};
|
||||
steps.push(step);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user