mirror of https://github.com/openclaw/openclaw.git
fix(heartbeat): prevent outer loop from exiting on task field lines
The YAML parser's outer loop was exiting the tasks block when it encountered 'interval:' or 'prompt:' lines, causing only the first task to be parsed. Added isTaskField check to skip those lines. Fixes: #3034790131
This commit is contained in:
parent
05c948e4de
commit
dbfb0b5618
|
|
@ -206,7 +206,13 @@ export function parseHeartbeatTasks(content: string): HeartbeatTask[] {
|
|||
}
|
||||
|
||||
// End of tasks block (either empty line or new top-level content)
|
||||
// Don't exit for task fields (interval:, prompt:, - name:)
|
||||
const isTaskField =
|
||||
trimmed.startsWith("interval:") ||
|
||||
trimmed.startsWith("prompt:") ||
|
||||
trimmed.startsWith("- name:");
|
||||
if (
|
||||
!isTaskField &&
|
||||
!trimmed.startsWith(" ") &&
|
||||
!trimmed.startsWith("\t") &&
|
||||
trimmed &&
|
||||
|
|
|
|||
Loading…
Reference in New Issue