You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12345678910111213141516171819202122232425
  1. import { memo } from 'react'
  2. import { useTranslation } from 'react-i18next'
  3. import { useIsChatMode } from '../hooks'
  4. import { useStore } from '../store'
  5. import { formatWorkflowRunIdentifier } from '../utils'
  6. import { ClockPlay } from '@/app/components/base/icons/src/vender/line/time'
  7. const RunningTitle = () => {
  8. const { t } = useTranslation()
  9. const isChatMode = useIsChatMode()
  10. const historyWorkflowData = useStore(s => s.historyWorkflowData)
  11. return (
  12. <div className='flex h-[18px] items-center text-xs text-gray-500'>
  13. <ClockPlay className='mr-1 h-3 w-3 text-gray-500' />
  14. <span>{isChatMode ? `Test Chat${formatWorkflowRunIdentifier(historyWorkflowData?.finished_at)}` : `Test Run${formatWorkflowRunIdentifier(historyWorkflowData?.finished_at)}`}</span>
  15. <span className='mx-1'>·</span>
  16. <span className='ml-1 flex h-[18px] items-center rounded-[5px] border border-indigo-300 bg-white/[0.48] px-1 text-[10px] font-semibold uppercase text-indigo-600'>
  17. {t('workflow.common.viewOnly')}
  18. </span>
  19. </div>
  20. )
  21. }
  22. export default memo(RunningTitle)