fix: 1.1.48 剔除桌面改读 profiles/web 的本机逻辑。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
叫我小杨同学andCursor committed 2026-10-02 17:31:49 +08:00
1 parent 7a8ba73cd5
commit e643f9a9a9
4 files changed
-159

No files matched your search

-32
View File
@@ -375,22 +375,6 @@ function shimNeedsPatch(state) {
async function settleInstalledPatches(config, ctx) {
try { core.rememberUnpackedArchive(); } catch { /* 没有官方安装目录时不必记归档 */ }
try {
const shell = core.alignOfficialShellProfile({ dshHome: process.env.DSH_HOME || "" });
if (shell.changed) {
bootFullQuit = true;
log(config, "official desktop now follows the web profile");
try {
hostctl.scheduleRestart(null, ctx);
} catch (e) {
log(config, "restart after web profile switch failed:", String(e && e.message ? e.message : e));
return "restart-failed";
}
return "full-quit";
}
} catch (e) {
log(config, "align web profile skipped:", String(e && e.message ? e.message : e));
}
if (officialUpdate.upgradeMarkerExists(process.execPath)) {
const upgraded = await reapply.reapplyInstalled({ scheduleSwap: false, upgrade: true });
if (!upgraded.ok) {
@@ -523,11 +507,6 @@ async function handlePurgeCommand(rawInput, config) {
if (blocked) return { kind: "error", text: blocked.error };
await core.backupAll(state.ai_base);
const report = await core.applyPatches(state.ai_base);
const shell = core.alignOfficialShellProfile({
dshHome: state.dsh_home || process.env.DSH_HOME || "",
exe: handoff?.exe,
appDir: handoff?.appDir,
});
const shimResult = await core.patchAllShims();
const flash = core.silenceCmdFlash(state.ai_base);
const lines = report.map((r) => {
@@ -539,14 +518,6 @@ async function handlePurgeCommand(rawInput, config) {
lines.push(` · ${dir} → ${typeof st === "object" ? JSON.stringify(st) : st}`);
}
lines.push(` cmd-flash=${flash.entry} phase-1=${flash.phase1} ok=${flash.ok}`);
if (shell.changed || shell.shell?.already || shell.shell?.changed) {
lines.push(
"",
shell.changed
? "官方桌面已改为读取 profiles/web(与 Web 端同一套渠道/插件配置)。"
: "官方桌面已对齐 profiles/web。",
);
}
if (scrubbed.length) {
lines.push("", "Desktop in-bin .bak scrub:");
for (const row of scrubbed) lines.push(` ✓ ${row.dir} → ${row.cleaned.join(", ")}`);
@@ -558,9 +529,6 @@ async function handlePurgeCommand(rawInput, config) {
if (swapped?.renamed || swapped?.pending) {
lines.push("", "补丁已写入。请在设置页点「重启」,客户端会自己重新打开。");
}
} else if (shell.changed) {
lines.push("", "已切换到 profiles/web。请在设置页点「重启」,客户端会自己重新打开。");
try { hostctl.scheduleRestart(null, null); } catch { /* 设置页再点重启即可 */ }
}
return { kind: "success", text: lines.join("\n") };
}