mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-24 14:44:46 +08:00
@@ -104,10 +104,9 @@ const ActivityListItem = React.memo(({ messageId }: { messageId: string }) => {
|
|||||||
const message = useMessage(messageId);
|
const message = useMessage(messageId);
|
||||||
if (message) {
|
if (message) {
|
||||||
if (!message.isStreaming && message.toolCalls?.length) {
|
if (!message.isStreaming && message.toolCalls?.length) {
|
||||||
for (const toolCall of message.toolCalls) {
|
const toolCallComponents = message.toolCalls
|
||||||
if (typeof toolCall.result === "string" && toolCall.result?.startsWith("Error")) {
|
.filter(toolCall => !(typeof toolCall.result === "string" && toolCall.result?.startsWith("Error")))
|
||||||
return null;
|
.map(toolCall => {
|
||||||
}
|
|
||||||
if (toolCall.name === "web_search") {
|
if (toolCall.name === "web_search") {
|
||||||
return <WebSearchToolCall key={toolCall.id} toolCall={toolCall} />;
|
return <WebSearchToolCall key={toolCall.id} toolCall={toolCall} />;
|
||||||
} else if (toolCall.name === "crawl_tool") {
|
} else if (toolCall.name === "crawl_tool") {
|
||||||
@@ -119,6 +118,10 @@ const ActivityListItem = React.memo(({ messageId }: { messageId: string }) => {
|
|||||||
} else {
|
} else {
|
||||||
return <MCPToolCall key={toolCall.id} toolCall={toolCall} />;
|
return <MCPToolCall key={toolCall.id} toolCall={toolCall} />;
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (toolCallComponents.length > 0) {
|
||||||
|
return <>{toolCallComponents}</>;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user