Refactor workflow auto-run to node graph

This commit is contained in:
QLHazyCoder
2026-05-15 17:41:35 +08:00
parent f6f804f1a2
commit 81fc40706a
76 changed files with 4028 additions and 1453 deletions
+4
View File
@@ -47,9 +47,13 @@ const bundle = [
'const PERSISTED_SETTING_DEFAULTS = { autoStepDelaySeconds: null };',
"const AUTO_RUN_PRE_EXECUTION_DELAYS_BY_STEP_KEY = new Map([['plus-checkout-create', 20000]]);",
'function getStepDefinitionForState(step, state = {}) { return state.definitions?.[step] || null; }',
'function getNodeIdByStepForState(step, state = {}) { return String(getStepDefinitionForState(step, state)?.key || step || "").trim(); }',
'function getNodeDefinitionForState(nodeId, state = {}) { return Object.values(state.definitions || {}).find((definition) => String(definition?.key || "").trim() === String(nodeId || "").trim()) || { executeKey: String(nodeId || "").trim() }; }',
extractFunction('normalizeAutoStepDelaySeconds'),
extractFunction('resolveLegacyAutoStepDelaySeconds'),
extractFunction('getStepExecutionKeyForState'),
extractFunction('getNodeExecutionKeyForState'),
extractFunction('getAutoRunPreExecutionDelayMsForNode'),
extractFunction('getAutoRunPreExecutionDelayMs'),
].join('\n');