dify/web/app/components/workflow/run/special-result-panel.tsx

63 lines
1.5 KiB
TypeScript
Raw Normal View History

2024-12-25 16:56:55 +08:00
import { RetryResultPanel } from './retry-log'
import { IterationResultPanel } from './iteration-log'
2024-12-26 10:16:12 +08:00
import { AgentResultPanel } from './agent-log'
2024-12-25 16:14:51 +08:00
import type { IterationDurationMap, NodeTracing } from '@/types/workflow'
type SpecialResultPanelProps = {
showRetryDetail: boolean
setShowRetryDetailFalse: () => void
retryResultList: NodeTracing[]
showIteratingDetail: boolean
setShowIteratingDetailFalse: () => void
iterationResultList: NodeTracing[][]
iterationResultDurationMap: IterationDurationMap
2024-12-26 10:16:12 +08:00
showAgentDetail: boolean
setShowAgentDetailFalse: () => void
2024-12-25 16:14:51 +08:00
}
const SpecialResultPanel = ({
showRetryDetail,
setShowRetryDetailFalse,
retryResultList,
showIteratingDetail,
setShowIteratingDetailFalse,
iterationResultList,
iterationResultDurationMap,
2024-12-26 10:16:12 +08:00
showAgentDetail,
setShowAgentDetailFalse,
2024-12-25 16:14:51 +08:00
}: SpecialResultPanelProps) => {
return (
<>
{
showRetryDetail && (
<RetryResultPanel
list={retryResultList}
onBack={setShowRetryDetailFalse}
/>
)
}
{
showIteratingDetail && (
<IterationResultPanel
list={iterationResultList}
onBack={setShowIteratingDetailFalse}
iterDurationMap={iterationResultDurationMap}
/>
)
}
2024-12-26 10:16:12 +08:00
{
showAgentDetail && (
<AgentResultPanel
onBack={setShowAgentDetailFalse}
/>
)
}
2024-12-25 16:14:51 +08:00
</>
)
}
export default SpecialResultPanel