MCPcopy Index your code
hub / github.com/QLHazyCoder/FlowPilot / completeStepFromBackground

Function completeStepFromBackground

background.js:4453–4469  ·  view source on GitHub ↗
(step, payload = {})

Source from the content-addressed store, hash-verified

4451}
4452
4453async function completeStepFromBackground(step, payload = {}) {
4454 if (stopRequested) {
4455 await setStepStatus(step, 'stopped');
4456 await appendManualAccountRunRecordIfNeeded(`step${step}_stopped`, null, STOP_ERROR_MESSAGE);
4457 notifyStepError(step, STOP_ERROR_MESSAGE);
4458 return;
4459 }
4460
4461 const completionState = step === 9 ? await getState() : null;
4462 await setStepStatus(step, 'completed');
4463 await addLog(`步骤 ${step} 已完成`, 'ok');
4464 await handleStepData(step, payload);
4465 if (step === 9) {
4466 await appendAndBroadcastAccountRunRecord('success', completionState);
4467 }
4468 notifyStepComplete(step, payload);
4469}
4470
4471async function appendManualAccountRunRecordIfNeeded(status, stateOverride = null, reason = '') {
4472 if (!accountRunHistoryHelpers?.appendAccountRunRecord) {

Callers 7

resolveVerificationStepFunction · 0.85
executeStep6Function · 0.85
executeStep2Function · 0.85
executeStep1Function · 0.85
finalizeStep8CallbackFunction · 0.85
executeStep4Function · 0.85
executeCpaStep9Function · 0.85

Calls 8

notifyStepErrorFunction · 0.85
getStateFunction · 0.85
notifyStepCompleteFunction · 0.85
setStepStatusFunction · 0.70
addLogFunction · 0.70
handleStepDataFunction · 0.70

Tested by

no test coverage detected