feat: Bark 增加开始运行与获得学分提醒
收尾通知去掉重复的积分台账与完成门数;学习统计在无 TTY 时照常累计,保证 Docker 里也能推送学分提醒。 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
18c5e5a3be
commit
6b508a0b1a
15 files changed
+188
-51
No files matched your search
@@ -8,7 +8,7 @@ import { runSession, disposeActiveSession } from './session.mjs';
|
||||
import { openLog } from './log.mjs';
|
||||
import { noDisplayReason, platformName } from './platform.mjs';
|
||||
import { createTui } from './tui.mjs';
|
||||
import { notifyRunFinished } from './notify.mjs';
|
||||
import { notifyRunStarted, notifyRunFinished } from './notify.mjs';
|
||||
|
||||
const RETRY_BASE_MS = 15000;
|
||||
const RETRY_MAX_MS = 120000;
|
||||
@@ -55,6 +55,11 @@ export async function runSupervisor(o) {
|
||||
}
|
||||
if (!cfg.TUI && cfg.tuiDisabledReason) log('面板:' + cfg.tuiDisabledReason());
|
||||
tui.set({ phase: '启动中' });
|
||||
if (!cfg.CHECK_ONLY) {
|
||||
// 整个进程只发一次「开始运行」;配了 restartMinutes 时每轮会话重开不再推
|
||||
tui.set({ phase: '发送 Bark 通知', tone: 'info' });
|
||||
await notifyRunStarted(cfg, { log, warn });
|
||||
}
|
||||
|
||||
let attempt = 0;
|
||||
let last = null;
|
||||
|
||||
Reference in new issue
Block a user