From 24a5a00679a99886387612ff991afbbd8c6be52d Mon Sep 17 00:00:00 2001 From: Jsonz Date: Thu, 30 Apr 2026 11:33:49 +0800 Subject: [PATCH] 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. --- frontend/src/components/workspace/messages/message-group.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/components/workspace/messages/message-group.tsx b/frontend/src/components/workspace/messages/message-group.tsx index d850757b6..0b2d2519c 100644 --- a/frontend/src/components/workspace/messages/message-group.tsx +++ b/frontend/src/components/workspace/messages/message-group.tsx @@ -451,7 +451,7 @@ function convertToSteps(messages: Message[]): CoTStep[] { id: message.id, messageId: message.id, type: "reasoning", - reasoning: extractReasoningContentFromMessage(message), + reasoning, }; steps.push(step); }