feat: 实现步骤跳过逻辑,支持手动跳过步骤 1 时级联跳过步骤 2~5

This commit is contained in:
QLHazyCoder
2026-04-17 19:24:26 +08:00
parent 4add7477d1
commit e643573946
4 changed files with 175 additions and 4 deletions
+10 -4
View File
@@ -4385,10 +4385,16 @@ async function skipStep(step) {
if (step === 1) {
const latestState = await getState();
const step2Status = latestState.stepStatuses?.[2];
if (!isStepDoneStatus(step2Status) && step2Status !== 'running') {
await setStepStatus(2, 'skipped');
await addLog('步骤 1 已跳过,步骤 2 也已同时跳过。', 'warn');
const skippedSteps = [];
for (let linkedStep = 2; linkedStep <= 5; linkedStep += 1) {
const linkedStatus = latestState.stepStatuses?.[linkedStep];
if (!isStepDoneStatus(linkedStatus) && linkedStatus !== 'running') {
await setStepStatus(linkedStep, 'skipped');
skippedSteps.push(linkedStep);
}
}
if (skippedSteps.length) {
await addLog(`步骤 1 已跳过,步骤 ${skippedSteps.join('、')} 也已同时跳过。`, 'warn');
}
}