Fix status Telegram: keep markdown in console output for agent relay

When --telegram, send directly and don't print. Otherwise keep * in
console output so agents capturing stdout can relay with formatting.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-06 14:13:01 -08:00
parent 199175f5f6
commit ba4bc9ac03

View File

@@ -264,11 +264,12 @@ const status = buildStatus();
if (jsonMode) {
console.log(JSON.stringify(status, null, 2));
} else {
} else if (telegramMode) {
const report = formatReport(status);
console.log(report.replace(/\*/g, ''));
if (telegramMode) {
const settings = loadConfig(resolve(__dir, 'config/settings.json'));
await sendTelegram(settings, report);
}
const settings = loadConfig(resolve(__dir, 'config/settings.json'));
await sendTelegram(settings, report);
console.log('Status sent to Telegram');
} else {
// Console output keeps markdown * for agents that relay stdout to Telegram
console.log(formatReport(status));
}