feat: 添加自动运行新尝试的状态重置逻辑,确保清除过期的运行状态

This commit is contained in:
QLHazyCoder
2026-04-14 00:23:32 +08:00
parent 0361283031
commit a6e2972499
2 changed files with 260 additions and 1 deletions
+3 -1
View File
@@ -3511,8 +3511,10 @@ async function autoRunLoop(totalRuns, options = {}) {
inbucketMailbox: prevState.inbucketMailbox,
cloudflareDomain: prevState.cloudflareDomain,
cloudflareDomains: prevState.cloudflareDomains,
// Fresh attempts must drop stale tab/url runtime state from the prior run.
tabRegistry: {},
sourceLastUrls: {},
...getAutoRunStatusPayload('running', { currentRun: targetRun, totalRuns, attemptRun: attemptRuns }),
...(forceFreshTabsNextRun ? { tabRegistry: {} } : {}),
};
await resetState();
await setState(keepSettings);