Skip to content

Commit a9afb06

Browse files
Vesperclaude
andcommitted
fix: strip markdown formatting before HEARTBEAT_OK check
Claude sometimes wraps HEARTBEAT_OK in backticks or bold markers. Strip leading formatting characters before the startsWith check. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 0f71a87 commit a9afb06

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/commands/start.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,8 @@ export async function start(args: string[] = []) {
564564
})
565565
.then((r) => {
566566
if (!r) return;
567-
const shouldForward = currentSettings.heartbeat.forwardToTelegram || !r.stdout.trim().startsWith("HEARTBEAT_OK");
567+
const stripped = r.stdout.trim().replace(/^[`*_ \n]+/, "");
568+
const shouldForward = currentSettings.heartbeat.forwardToTelegram || !stripped.startsWith("HEARTBEAT_OK");
568569
if (shouldForward) {
569570
forwardToTelegram("", r);
570571
forwardToDiscord("", r);

0 commit comments

Comments
 (0)