fix: 发布 1.1.41,官方模式与红队分开注入,回退留在当前会话。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
叫我小杨同学andCursor committed 2026-09-30 20:00:23 +08:00
1 parent 3bc63beca4
commit eed95f79cb
13 files changed
+1442 -423

No files matched your search

+6 -4
View File
@@ -101,19 +101,21 @@ export async function reapplyInstalled(options = {}) {
const report = await core.applyPatches(aiBase);
await core.patchAllShims();
const flash = core.silenceCmdFlash(aiBase);
const summary = core.summarizeApplyReport(report);
const clean = summary.failed.length === 0 && flash.ok === true && core.hostCleanMarkersPresent(aiBase);
if (clean) writeAppliedStamp(installedRev());
let renamed = false;
if (handoff?.asar && options.scheduleSwap !== false) {
if (clean && handoff?.asar && options.scheduleSwap !== false) {
const swapped = core.scheduleSealedDesktopRestart(handoff);
renamed = Boolean(swapped?.renamed);
}
const summary = core.summarizeApplyReport(report);
writeAppliedStamp(installedRev());
const pending = Boolean(handoff?.asar && !renamed && options.scheduleSwap !== false);
// 只有真的挪开了 app.asar,当前进程才还在旧包上,需要再开一次。
// 官方端已经在 resources/app 里跑时,不能仅因 ELECTRON_RUN_AS_NODE 再弹「需要重启」,
// 否则每次打开面板都会再要一次重启。
return {
ok: true,
ok: clean,
error: clean ? "" : "清洗没有完成",
version: pluginVersion(),
reverted: reverted.reverted?.length || 0,
applied: summary.applied || 0,