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

Function cancelScheduledAutoRun

background.js:4063–4091  ·  view source on GitHub ↗
(options = {})

Source from the content-addressed store, hash-verified

4061}
4062
4063async function cancelScheduledAutoRun(options = {}) {
4064 const state = await getState();
4065 const plan = getPendingAutoRunTimerPlan(state);
4066 if (!plan || plan.kind !== AUTO_RUN_TIMER_KIND_SCHEDULED_START) {
4067 return false;
4068 }
4069
4070 autoRunCurrentRun = 0;
4071 autoRunTotalRuns = plan.totalRuns;
4072 autoRunAttemptRun = 0;
4073 await broadcastAutoRunStatus(
4074 'idle',
4075 {
4076 currentRun: 0,
4077 totalRuns: plan.totalRuns,
4078 attemptRun: 0,
4079 },
4080 {
4081 autoRunRoundSummaries: [],
4082 autoRunTimerPlan: null,
4083 scheduledAutoRunPlan: null,
4084 }
4085 );
4086 await clearAutoRunTimerAlarm();
4087 if (options.logMessage !== false) {
4088 await addLog(options.logMessage || '已取消自动运行倒计时计划。', 'warn');
4089 }
4090 return true;
4091}
4092
4093async function restoreAutoRunTimerIfNeeded() {
4094 const state = await getState();

Callers 2

requestStopFunction · 0.85
handleMessageFunction · 0.85

Calls 5

getStateFunction · 0.85
broadcastAutoRunStatusFunction · 0.85
clearAutoRunTimerAlarmFunction · 0.85
addLogFunction · 0.70

Tested by

no test coverage detected