From 07aa2ca9cf7e3d3d2deb8bcd4edb69cf57e9920c Mon Sep 17 00:00:00 2001 From: zxhlyh Date: Fri, 3 Jan 2025 16:34:23 +0800 Subject: [PATCH] fix: single run log --- web/app/components/workflow/run/node.tsx | 8 ++++---- web/app/components/workflow/run/result-panel.tsx | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/web/app/components/workflow/run/node.tsx b/web/app/components/workflow/run/node.tsx index 9efd03df7a..33ed05e891 100644 --- a/web/app/components/workflow/run/node.tsx +++ b/web/app/components/workflow/run/node.tsx @@ -78,10 +78,10 @@ const NodePanel: FC = ({ setCollapseState(!nodeInfo.expand) }, [nodeInfo.expand, setCollapseState]) - const isIterationNode = nodeInfo.node_type === BlockEnum.Iteration && nodeInfo.details?.length - const isRetryNode = hasRetryNode(nodeInfo.node_type) && nodeInfo.retryDetail?.length - const isAgentNode = nodeInfo.node_type === BlockEnum.Agent && nodeInfo.agentLog?.length - const isToolNode = nodeInfo.node_type === BlockEnum.Tool && nodeInfo.agentLog?.length + const isIterationNode = nodeInfo.node_type === BlockEnum.Iteration && !!nodeInfo.details?.length + const isRetryNode = hasRetryNode(nodeInfo.node_type) && !!nodeInfo.retryDetail?.length + const isAgentNode = nodeInfo.node_type === BlockEnum.Agent && !!nodeInfo.agentLog?.length + const isToolNode = nodeInfo.node_type === BlockEnum.Tool && !!nodeInfo.agentLog?.length return (
diff --git a/web/app/components/workflow/run/result-panel.tsx b/web/app/components/workflow/run/result-panel.tsx index a198b2ff6d..b05e5cb888 100644 --- a/web/app/components/workflow/run/result-panel.tsx +++ b/web/app/components/workflow/run/result-panel.tsx @@ -57,10 +57,10 @@ const ResultPanel: FC = ({ handleShowAgentOrToolLog, }) => { const { t } = useTranslation() - const isIterationNode = nodeInfo?.node_type === BlockEnum.Iteration && nodeInfo?.details?.length - const isRetryNode = hasRetryNode(nodeInfo?.node_type) && nodeInfo?.retryDetail?.length - const isAgentNode = nodeInfo?.node_type === BlockEnum.Agent && nodeInfo?.agentLog?.length - const isToolNode = nodeInfo?.node_type === BlockEnum.Tool && nodeInfo?.agentLog?.length + const isIterationNode = nodeInfo?.node_type === BlockEnum.Iteration && !!nodeInfo?.details?.length + const isRetryNode = hasRetryNode(nodeInfo?.node_type) && !!nodeInfo?.retryDetail?.length + const isAgentNode = nodeInfo?.node_type === BlockEnum.Agent && !!nodeInfo?.agentLog?.length + const isToolNode = nodeInfo?.node_type === BlockEnum.Tool && !!nodeInfo?.agentLog?.length return (