import type { AgentLogItemWithChildren, IterationDurationMap, LoopDurationMap, LoopVariableMap, NodeTracing, } from '@/types/workflow' import AgentResultPanel from './agent-log/agent-result-panel' import { IterationResultPanel } from './iteration-log' import { LoopResultPanel } from './loop-log' import { RetryResultPanel } from './retry-log' 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 loopResultVariableMap?: LoopVariableMap agentOrToolLogItemStack?: AgentLogItemWithChildren[] agentOrToolLogListMap?: Record handleShowAgentOrToolLog?: (detail?: AgentLogItemWithChildren) => void } const SpecialResultPanel = ({ showRetryDetail, setShowRetryDetailFalse, retryResultList, showIteratingDetail, setShowIteratingDetailFalse, iterationResultList, iterationResultDurationMap, showLoopingDetail, setShowLoopingDetailFalse, loopResultList, loopResultDurationMap, loopResultVariableMap, 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