Przeglądaj źródła

feat: 优化跳过步骤逻辑,确保步骤 1 跳过时同时跳过步骤 2

QLHazyCoder 4 miesięcy temu
rodzic
commit
237980037b
1 zmienionych plików z 10 dodań i 0 usunięć
  1. 10 0
      background.js

+ 10 - 0
background.js

@@ -666,6 +666,16 @@ async function skipStep(step) {
 
   await setStepStatus(step, 'skipped');
   await addLog(`步骤 ${step} 已跳过`, 'warn');
+
+  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');
+    }
+  }
+
   return { ok: true, step, status: 'skipped' };
 }