running-title.tsx 992 B

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