mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-03 06:12:14 +08:00
fix(frontend): filter task tool calls when rendering SubtaskCard (#1242)
Only tool calls with name === "task" should be rendered as SubtaskCard. Previously all tool_calls were mapped to IDs, causing SubtaskCard to render for non-task tool calls whose IDs were never registered in the subtask context, resulting in a TypeError on task.status. Signed-off-by: Gao Mingfei <g199209@gmail.com> Co-authored-by: Willem Jiang <willem.jiang@gmail.com>
This commit is contained in:
@@ -168,9 +168,9 @@ export function MessageList({
|
||||
{t.subtasks.executing(tasks.size)}
|
||||
</div>,
|
||||
);
|
||||
const taskIds = message.tool_calls?.map(
|
||||
(toolCall) => toolCall.id,
|
||||
);
|
||||
const taskIds = message.tool_calls
|
||||
?.filter((toolCall) => toolCall.name === "task")
|
||||
.map((toolCall) => toolCall.id);
|
||||
for (const taskId of taskIds ?? []) {
|
||||
results.push(
|
||||
<SubtaskCard
|
||||
|
||||
Reference in New Issue
Block a user