build: 内网环境下跳过 Windows node-pty 补丁构建并关闭 GitHub 发布
Some checks failed
AI automation / Route event (push) Has been cancelled
AI automation / Hand reopened issue to maintainers (push) Has been cancelled
AI automation / Clean source issue state (push) Has been cancelled
AI automation / Reconcile handoffs (push) Has been cancelled
AI automation / Classify issue (push) Has been cancelled
AI automation / Claude Code smoke (push) Has been cancelled
AI automation / Review issue follow-up (push) Has been cancelled
AI automation / Publish issue follow-up (push) Has been cancelled
AI automation / Implement with Claude Code (push) Has been cancelled
AI automation / Publish implement PR (push) Has been cancelled
AI automation / Continue queued issue comments (push) Has been cancelled
AI automation / Codex review loop (push) Has been cancelled
AI automation / Publish Codex fix (push) Has been cancelled
AI automation / Clear Codex dispatch marker (push) Has been cancelled
AI automation / Own PR re-request Codex (push) Has been cancelled
AI automation / External PR re-request Codex (push) Has been cancelled
AI automation / Poll Codex reaction / retry (push) Has been cancelled
Star History / update (push) Has been cancelled

调整 electron-builder 配置,Windows 平台仅打包 zip 格式,注释掉 NSIS 和 portable 目标;
注释掉 Windows Hello helper 资源配置以避免路径不存在导致的打包失败;
将发布配置设为 null 以关闭 GitHub 发布请求;
修改 afterPack 脚本,跳过 Windows 下 node-pty ConPTY 补丁的重建和复制,因内网无 MSVC 工具链无法完成该操作。
This commit is contained in:
2026-10-15 15:30:31 +08:00
parent 2561001dca
commit 336c3afd47
7 changed files with 152 additions and 139 deletions

View File

@@ -295,46 +295,10 @@ export function ReportPage() {
}, [loadSnapshots]);
// ─── 定时巡检 ───
// 每 60 秒检查一次:schedule.enabled + 上次执行时间 + defaultIntervalHours 是否到点
// 注意:用户必须打开巡检报告页面(此组件 mount),否则定时器不工作
useEffect(() => {
if (!schedule?.enabled) return;
const checkAndRun = async () => {
if (running) return; // 正在执行就跳过
const intervalMs = (schedule.defaultIntervalHours || 1) * 3600 * 1000;
const now = Date.now();
const sinceLast = now - lastRunAtRef.current;
// 首次(lastRunAtRef = 0)且间隔已过 → 立刻触发(最多等 60s 下一次 tick)
if (lastRunAtRef.current === 0) {
// 用最新快照时间作为基准
const latestSnapTs = snapshots[0]?.timestamp || 0;
if (latestSnapTs > 0 && now - latestSnapTs >= intervalMs) {
lastRunAtRef.current = now;
console.log("[ReportPage] 定时巡检触发(基于最新快照时间)");
void handleRunSnapshot("scheduled");
}
return;
}
if (sinceLast >= intervalMs) {
lastRunAtRef.current = now;
console.log("[ReportPage] 定时巡检触发(间隔已到)");
void handleRunSnapshot("scheduled");
}
};
const timer = setInterval(() => { void checkAndRun(); }, 60 * 1000);
// mount 后 5 秒先检查一次(不等 60s)
const initial = setTimeout(() => { void checkAndRun(); }, 5000);
return () => {
clearInterval(timer);
clearTimeout(initial);
};
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [schedule?.enabled, schedule?.defaultIntervalHours, running]);
// 【已废弃】2026-10-15 移除 —— 定时巡检已迁移到主进程 reportScheduler 独立执行
// 不再依赖用户打开巡检报告页面(此组件 mount),关闭页面也会定时跑
// 之前这里 + useReportAutoScheduler + 主进程三路并行,每次触发产生重复快照
// 手动触发巡检请直接点击页面上的"立即巡检"按钮(handleRunSnapshot)
// 订阅主进程 AI 汇总状态广播 —— 主进程独立执行,页面切换也不影响
useEffect(() => {