(actionLabel)
| 4129 | } |
| 4130 | |
| 4131 | async function ensureManualInteractionAllowed(actionLabel) { |
| 4132 | const state = await getState(); |
| 4133 | |
| 4134 | if (isAutoRunLockedState(state)) { |
| 4135 | throw new Error(`自动流程运行中,请先停止后再${actionLabel}。`); |
| 4136 | } |
| 4137 | if (isAutoRunPausedState(state)) { |
| 4138 | throw new Error(`自动流程当前已暂停。请点击“继续”,或先确认接管自动流程后再${actionLabel}。`); |
| 4139 | } |
| 4140 | if (isAutoRunScheduledState(state)) { |
| 4141 | throw new Error(`自动流程已计划启动。请先取消计划,或立即开始后再${actionLabel}。`); |
| 4142 | } |
| 4143 | |
| 4144 | return state; |
| 4145 | } |
| 4146 | |
| 4147 | async function skipStep(step) { |
| 4148 | const state = await ensureManualInteractionAllowed('跳过步骤'); |
no test coverage detected