feat: 添加 Plus 模式和贡献模式支持,增强步骤执行延迟和提示逻辑

This commit is contained in:
QLHazyCoder
2026-04-26 08:51:20 +08:00
parent f558194185
commit 227ebedda4
10 changed files with 577 additions and 14 deletions
+4
View File
@@ -180,6 +180,8 @@
failedStep: Number.isInteger(failedStep) && failedStep > 0 ? failedStep : null,
source,
autoRunContext: source === 'auto' ? autoRunContext : null,
plusModeEnabled: Boolean(record.plusModeEnabled),
contributionMode: Boolean(record.contributionMode),
};
}
@@ -242,6 +244,8 @@
failedStep: Number.isInteger(failedStep) && failedStep > 0 ? failedStep : null,
source,
autoRunContext,
plusModeEnabled: Boolean(state.plusModeEnabled),
contributionMode: Boolean(state.contributionMode),
};
}
+1 -3
View File
@@ -4,7 +4,6 @@
const PLUS_CHECKOUT_SOURCE = 'plus-checkout';
const PLUS_CHECKOUT_ENTRY_URL = 'https://chatgpt.com/';
const PLUS_CHECKOUT_INJECT_FILES = ['content/utils.js', 'content/plus-checkout.js'];
const PLUS_CHECKOUT_POST_CREATE_WAIT_MS = 20000;
function createPlusCheckoutCreateExecutor(deps = {}) {
const {
@@ -65,8 +64,7 @@
plusCheckoutCurrency: result.currency || 'EUR',
});
await addLog('步骤 6Plus Checkout 页面已就绪,固定等待 20 秒后继续下一步。', 'info');
await sleepWithStop(PLUS_CHECKOUT_POST_CREATE_WAIT_MS);
await addLog('步骤 6Plus Checkout 页面已就绪,准备继续下一步。', 'info');
await completeStepFromBackground(6, {
plusCheckoutCountry: result.country || 'DE',