import { RetryResultPanel } from './retry-log' import { IterationResultPanel } from './iteration-log' import { LoopResultPanel } from './loop-log' import { AgentResultPanel } from './agent-log' import type { AgentLogItemWithChildren, IterationDurationMap, LoopDurationMap, NodeTracing, } from '@/types/workflow' export type SpecialResultPanelProps = { showRetryDetail?: boolean setShowRetryDetailFalse?: () => void retryResultList?: NodeTracing[] showIteratingDetail?: boolean setShowIteratingDetailFalse?: () => void iterationResultList?: NodeTracing[][] iterationResultDurationMap?: IterationDurationMap showLoopingDetail?: boolean setShowLoopingDetailFalse?: () => void loopResultList?: NodeTracing[][] loopResultDurationMap?: LoopDurationMap agentOrToolLogItemStack?: AgentLogItemWithChildren[] agentOrToolLogListMap?: Record handleShowAgentOrToolLog?: (detail?: AgentLogItemWithChildren) => void } const SpecialResultPanel = ({ showRetryDetail, setShowRetryDetailFalse, retryResultList, showIteratingDetail, setShowIteratingDetailFalse, iterationResultList, iterationResultDurationMap, showLoopingDetail, setShowLoopingDetailFalse, loopResultList, loopResultDurationMap, agentOrToolLogItemStack, agentOrToolLogListMap, handleShowAgentOrToolLog, }: SpecialResultPanelProps) => { return (
{ e.stopPropagation() e.nativeEvent.stopImmediatePropagation() }}> { !!showRetryDetail && !!retryResultList?.length && setShowRetryDetailFalse && ( ) } { showIteratingDetail && !!iterationResultList?.length && setShowIteratingDetailFalse && ( ) } { showLoopingDetail && !!loopResultList?.length && setShowLoopingDetailFalse && ( ) } { !!agentOrToolLogItemStack?.length && agentOrToolLogListMap && handleShowAgentOrToolLog && ( ) }
) } export default SpecialResultPanel