mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-09 16:21:15 +00:00
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:
committed by
Peter Steinberger
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 &&
|
||||
|
||||
Reference in New Issue
Block a user