
























@@ -676,13 +676,12 @@ function resolveHeartbeatRunPrompt(params: {
676676.map((event) => event.text);
677677const execEvents = params.preflight.shouldInspectPendingEvents
678678 ? pendingEventEntries
679-.filter((event) => event.trusted !== false && isExecCompletionEvent(event.text))
679+.filter((event) => isExecCompletionEvent(event.text))
680680.map((event) => event.text)
681681 : [];
682682const hasExecCompletion = execEvents.length > 0;
683683const hasCronEvents = cronEvents.length > 0;
684684685-// If tasks are defined, build a batched prompt with due tasks
686685if (params.preflight.tasks && params.preflight.tasks.length > 0) {
687686const tasks = params.preflight.tasks;
688687const dueTasks = tasks.filter((task) =>
@@ -701,7 +700,6 @@ ${taskList}
701700702701After completing all due tasks, reply HEARTBEAT_OK.`;
703702704-// Preserve HEARTBEAT.md directives (non-task content)
705703if (params.heartbeatFileContent) {
706704const directives = params.heartbeatFileContent
707705.replace(/^[\s\S]*?^tasks:[\s\S]*?(?=^[^\s]|^$)/m, "")
@@ -712,11 +710,9 @@ After completing all due tasks, reply HEARTBEAT_OK.`;
712710}
713711return { prompt, hasExecCompletion: false, hasCronEvents: false };
714712}
715-// No tasks due - skip this heartbeat to avoid wasteful API calls
716713return { prompt: null, hasExecCompletion: false, hasCronEvents: false };
717714}
718715719-// Fallback to original behavior
720716const basePrompt = hasExecCompletion
721717 ? buildExecEventPrompt(execEvents, { deliverToUser: params.canRelayToUser })
722718 : hasCronEvents
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。