import type { FC } from 'react' import { memo } from 'react' import { useTranslation } from 'react-i18next' import { RiLoader2Line, RiPlayLargeLine, } from '@remixicon/react' import { useStore } from '../store' import { useIsChatMode, useNodesReadOnly, useWorkflowRun, useWorkflowStartRun, } from '../hooks' import { WorkflowRunningStatus } from '../types' import ViewHistory from './view-history' import Checklist from './checklist' import cn from '@/utils/classnames' import { StopCircle, } from '@/app/components/base/icons/src/vender/line/mediaAndDevices' const RunMode = memo(() => { const { t } = useTranslation() const { handleWorkflowStartRunInWorkflow } = useWorkflowStartRun() const { handleStopRun } = useWorkflowRun() const workflowRunningData = useStore(s => s.workflowRunningData) const isRunning = workflowRunningData?.result.status === WorkflowRunningStatus.Running return ( <>