Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

1.3 KB
Raw Blame
'use client'

import type { NodeTracing } from '@/types/workflow'
import { memo } from 'react'
import { useTranslation } from 'react-i18next'
import NodePanel from '../node'

type Props = {
  readonly list: NodeTracing[]
  readonly onBack: () => void
}

function RetryResultPanel({ list, onBack }: Props) {
  const { t } = useTranslation(['workflow'])

  return (
    <div>
      <button
        type="button"
        className="flex h-8 w-full cursor-pointer items-center bg-components-panel-bg px-4 system-sm-medium text-text-accent-secondary focus-visible:ring-2 focus-visible:ring-state-accent-solid focus-visible:outline-hidden"
        onClick={(e) => {
          e.stopPropagation()
          e.nativeEvent.stopImmediatePropagation()
          onBack()
        }}
      >
        <span aria-hidden className="mr-1 i-ri-arrow-left-line size-4" />
        {t(($) => $['singleRun.back'], { ns: 'workflow' })}
      </button>
      <div className="bg-background-section-burn py-2">
        {list.map((item, index) => (
          <NodePanel
            key={`${item.id}:${item.retry_index ?? item.created_at}`}
            nodeInfo={{
              ...item,
              title: `${t(($) => $['nodes.common.retry.retry'], { ns: 'workflow' })} ${index + 1}`,
            }}
          />
        ))}
      </div>
    </div>
  )
}
export default memo(RetryResultPanel)