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
import { useAtomValue } from 'jotai'
import { memo } from 'react'
import { useTranslation } from 'react-i18next'
import { isChatflowAtom } from '@/app/components/workflow/editor-resource/state'
import { useStore } from '../store'
import { formatWorkflowRunIdentifier } from '../utils'

const RunningTitle = () => {
  const { t } = useTranslation(['workflow'] as const)
  const isChatflow = useAtomValue(isChatflowAtom)
  const historyWorkflowData = useStore((s) => s.historyWorkflowData)

  return (
    <div className="flex h-4.5 items-center text-xs text-gray-500">
      <span
        aria-hidden
        className="me-1 i-custom-vender-line-time-clock-play size-3 text-gray-500"
      />
      <span>
        {isChatflow
          ? `Test Chat${formatWorkflowRunIdentifier(historyWorkflowData?.finished_at, historyWorkflowData?.status)}`
          : `Test Run${formatWorkflowRunIdentifier(historyWorkflowData?.finished_at, historyWorkflowData?.status)}`}
      </span>
      <span className="mx-1">·</span>
      <span className="ms-1 flex h-4.5 items-center rounded-[5px] border border-indigo-300 bg-white/48 px-1 text-2xs font-semibold text-indigo-600 uppercase">
        {t(($) => $['common.viewOnly'], { ns: 'workflow' })}
      </span>
    </div>
  )
}

export default memo(RunningTitle)