mirror of
http://112.124.100.131/huang.ze/ebiz-dify-ai.git
synced 2025-12-15 05:46:52 +08:00
Feature/newnew workflow loop node (#14863)
Co-authored-by: arkunzz <4873204@qq.com>
This commit is contained in:
@@ -13,6 +13,7 @@ import type {
|
||||
import { BlockEnum } from '@/app/components/workflow/types'
|
||||
import { hasRetryNode } from '@/app/components/workflow/utils'
|
||||
import { IterationLogTrigger } from '@/app/components/workflow/run/iteration-log'
|
||||
import { LoopLogTrigger } from '@/app/components/workflow/run/loop-log'
|
||||
import { RetryLogTrigger } from '@/app/components/workflow/run/retry-log'
|
||||
import { AgentLogTrigger } from '@/app/components/workflow/run/agent-log'
|
||||
|
||||
@@ -33,6 +34,7 @@ type ResultPanelProps = {
|
||||
exceptionCounts?: number
|
||||
execution_metadata?: any
|
||||
handleShowIterationResultList?: (detail: NodeTracing[][], iterDurationMap: any) => void
|
||||
handleShowLoopResultList?: (detail: NodeTracing[][], loopDurationMap: any) => void
|
||||
onShowRetryDetail?: (detail: NodeTracing[]) => void
|
||||
handleShowAgentOrToolLog?: (detail?: AgentLogItemWithChildren) => void
|
||||
}
|
||||
@@ -53,11 +55,13 @@ const ResultPanel: FC<ResultPanelProps> = ({
|
||||
exceptionCounts,
|
||||
execution_metadata,
|
||||
handleShowIterationResultList,
|
||||
handleShowLoopResultList,
|
||||
onShowRetryDetail,
|
||||
handleShowAgentOrToolLog,
|
||||
}) => {
|
||||
const { t } = useTranslation()
|
||||
const isIterationNode = nodeInfo?.node_type === BlockEnum.Iteration && !!nodeInfo?.details?.length
|
||||
const isLoopNode = nodeInfo?.node_type === BlockEnum.Loop && !!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
|
||||
@@ -82,6 +86,14 @@ const ResultPanel: FC<ResultPanelProps> = ({
|
||||
/>
|
||||
)
|
||||
}
|
||||
{
|
||||
isLoopNode && handleShowLoopResultList && (
|
||||
<LoopLogTrigger
|
||||
nodeInfo={nodeInfo}
|
||||
onShowLoopResultList={handleShowLoopResultList}
|
||||
/>
|
||||
)
|
||||
}
|
||||
{
|
||||
isRetryNode && onShowRetryDetail && (
|
||||
<RetryLogTrigger
|
||||
|
||||
Reference in New Issue
Block a user