Ver Fonte

fix: duck email failure skips to next run instead of pausing

In auto-run mode, if duck email generation fails, treat it as a run
failure and continue to next iteration instead of waiting for manual input.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
chendeben há 4 meses atrás
pai
commit
6b8c4a3e4b
1 ficheiros alterados com 2 adições e 22 exclusões
  1. 2 22
      background.js

+ 2 - 22
background.js

@@ -971,28 +971,8 @@ async function autoRunLoop(totalRuns) {
       await executeStepAndWait(1, 2000);
       await executeStepAndWait(2, 2000);
 
-      let emailReady = false;
-      try {
-        const duckEmail = await fetchDuckEmail({ generateNew: true });
-        await addLog(`=== Run ${run}/${totalRuns} — Duck email ready: ${duckEmail} ===`, 'ok');
-        emailReady = true;
-      } catch (err) {
-        await addLog(`Duck Mail auto-fetch failed: ${err.message}`, 'warn');
-      }
-
-      if (!emailReady) {
-        await addLog(`=== Run ${run}/${totalRuns} PAUSED: Fetch Duck email or paste manually, then continue ===`, 'warn');
-        chrome.runtime.sendMessage(status('waiting_email')).catch(() => {});
-
-        // Wait for RESUME_AUTO_RUN — sets a promise that resumeAutoRun resolves
-        await waitForResume();
-
-        const resumedState = await getState();
-        if (!resumedState.email) {
-          await addLog('Cannot resume: no email address.', 'error');
-          break;
-        }
-      }
+      const duckEmail = await fetchDuckEmail({ generateNew: true });
+      await addLog(`=== Run ${run}/${totalRuns} — Duck email ready: ${duckEmail} ===`, 'ok');
 
       await addLog(`=== Run ${run}/${totalRuns} — Phase 2: Register, verify, login, complete ===`, 'info');
       chrome.runtime.sendMessage(status('running')).catch(() => {});