You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
\`HEARTBEAT.md\` lives in the agent workspace. Keep the file empty, or with only Markdown comments and headings, when you want OpenClaw to skip heartbeat model calls.
@@ -119,7 +161,30 @@ Add short tasks below the comments only when you want the agent to check somethi
Copy file name to clipboardExpand all lines: src/commands/doctor-heartbeat-template-repair.ts
+71-14Lines changed: 71 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -9,21 +9,49 @@ import { writeTextAtomic } from "../infra/json-files.js";
9
9
import{note}from"../terminal/note.js";
10
10
import{shortenHomePath}from"../utils.js";
11
11
12
-
constDIRTY_HEARTBEAT_TEMPLATE_LINES=newSet([
12
+
constLEGACY_HEARTBEAT_PROSE_TEMPLATE=[
13
+
"# HEARTBEAT.md",
14
+
"Keep this file empty unless you want a tiny checklist. Keep it small.",
15
+
]asconst;
16
+
17
+
constLEGACY_HEARTBEAT_HEADING_FENCED_TEMPLATE=[
18
+
"# HEARTBEAT.md Template",
13
19
"```markdown",
20
+
"# Keep this file empty (or with only comments) to skip heartbeat API calls.",
21
+
"# Add tasks below when you want the agent to check something periodically.",
14
22
"```",
15
-
"# HEARTBEAT.md Template",
23
+
]asconst;
24
+
25
+
constLEGACY_HEARTBEAT_FENCED_TEMPLATE=[
26
+
"```markdown",
27
+
"# Keep this file empty (or with only comments) to skip heartbeat API calls.",
28
+
"# Add tasks below when you want the agent to check something periodically.",
29
+
"```",
30
+
]asconst;
31
+
32
+
constLEGACY_HEARTBEAT_FENCED_RELATED_TEMPLATE=[
33
+
"```markdown",
34
+
"# Keep this file empty (or with only comments) to skip heartbeat API calls.",
35
+
"# Add tasks below when you want the agent to check something periodically.",
36
+
"```",
37
+
"## Related",
38
+
"- [Heartbeat config](/gateway/config-agents)",
39
+
]asconst;
40
+
41
+
constDOCS_HEARTBEAT_TEMPLATE_PAGE_AS_TEMPLATE=[
16
42
"# HEARTBEAT.md template",
17
43
"`HEARTBEAT.md` lives in the agent workspace. Keep the file empty, or with only Markdown comments and headings, when you want OpenClaw to skip heartbeat model calls.",
18
44
"The default runtime template is:",
19
-
"Add short tasks below the comments only when you want the agent to check something periodically. Keep heartbeat instructions small because they are read during recurring wakes.",
45
+
"```markdown",
20
46
"# Keep this file empty (or with only comments) to skip heartbeat API calls.",
21
47
"# Add tasks below when you want the agent to check something periodically.",
48
+
"```",
49
+
"Add short tasks below the comments only when you want the agent to check something periodically. Keep heartbeat instructions small because they are read during recurring wakes.",
22
50
"## Related",
23
51
"- [Heartbeat config](/gateway/config-agents)",
24
-
]);
52
+
]asconst;
25
53
26
-
constDIRTY_HEARTBEAT_TEMPLATE_BODY_LINES=[
54
+
constHEARTBEAT_DEFAULT_BODY_LINES=[
27
55
"# Keep this file empty (or with only comments) to skip heartbeat API calls.",
28
56
"# Add tasks below when you want the agent to check something periodically.",
29
57
]asconst;
@@ -35,30 +63,59 @@ const DIRTY_HEARTBEAT_DOC_WRAPPER_LINES = new Set([
"`HEARTBEAT.md` lives in the agent workspace. Keep the file empty, or with only Markdown comments and headings, when you want OpenClaw to skip heartbeat model calls.",
72
+
"The default runtime template is:",
73
+
"Add short tasks below the comments only when you want the agent to check something periodically. Keep heartbeat instructions small because they are read during recurring wakes.",
74
+
...LEGACY_HEARTBEAT_PROSE_TEMPLATE,
75
+
"# Keep this file empty (or with only comments) to skip heartbeat API calls.",
76
+
"# Add tasks below when you want the agent to check something periodically.",
0 commit comments