mirror of
https://github.com/YuJunZhiXue/dsh-purge.git
synced 2026-11-28 09:10:22 +08:00
fix: 1.1.48 剔除桌面改读 profiles/web 的本机逻辑。
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
7a8ba73cd5
commit
e643f9a9a9
4 files changed
-159
No files matched your search
-43
@@ -1744,12 +1744,6 @@ export async function openSealedDesktopHost(options = {}) {
|
||||
restoreUnusableExtract(appDir, prev);
|
||||
throw new Error(`已解开 ${handoff.asar},但 ${appDir} 下没有 @deepseek-ai`);
|
||||
}
|
||||
try {
|
||||
desktop.useWebProfileInOfficialShell(appDir);
|
||||
desktop.ensureDesktopRemoteUiOff(findDshHome());
|
||||
} catch {
|
||||
/* 壳入口或缺 Web profile 时下次 Apply 再对齐 */
|
||||
}
|
||||
resetPathMemo();
|
||||
return { aiBase, swapAsar: true, exe: handoff.exe, asar: handoff.asar, extracted, prev, appDir, archive: extracted ? archive : null };
|
||||
}
|
||||
@@ -1869,10 +1863,6 @@ export function desktopAsarStillSealed(input = {}) {
|
||||
return Boolean(handoff?.asar && asarArchiveIsFile(handoff.asar));
|
||||
}
|
||||
|
||||
export function alignOfficialShellProfile(input = {}) {
|
||||
return desktop.alignOfficialDesktopProfile(input);
|
||||
}
|
||||
|
||||
export function officialHostMustStayUp() {
|
||||
return process.env.ELECTRON_RUN_AS_NODE === "1" && desktop.isOfficialHarnessExecutable(process.execPath);
|
||||
}
|
||||
@@ -3342,39 +3332,6 @@ const NEW_TOOL_PATCHES = [
|
||||
],
|
||||
markers: ["function dshPurgeHandoffDesktopUpdate", "dshPurgeHandoffDesktopUpdate(this)"],
|
||||
},
|
||||
{
|
||||
id: 70,
|
||||
name: "OFFICIAL_DESKTOP_USE_WEB_PROFILE",
|
||||
layer: "代码",
|
||||
layer_en: "Code",
|
||||
desc: "官方桌面有 Web profile 时改读 profiles/web,渠道和插件与 Web 端一致",
|
||||
file: "desktop-shell",
|
||||
surfaces: ["desktop"],
|
||||
optional: true,
|
||||
skipIfMarked: true,
|
||||
replacements: [
|
||||
{
|
||||
pattern:
|
||||
"function resolveDesktopPaths(dshHome = resolveDshHome()) {\n" +
|
||||
"\treturn {\n" +
|
||||
'\t\tprofile: join(dshHome, "profiles", "desktop"),\n' +
|
||||
'\t\tlock: join(dshHome, "profiles", "desktop", "lock")\n' +
|
||||
"\t};\n" +
|
||||
"}",
|
||||
replace:
|
||||
"function resolveDesktopPaths(dshHome = resolveDshHome()) {\n" +
|
||||
'\tconst webProfile = join(dshHome, "profiles", "web");\n' +
|
||||
'\tconst desktopProfile = join(dshHome, "profiles", "desktop");\n' +
|
||||
'\tconst profile = existsSync(join(webProfile, "package.json")) ? webProfile : desktopProfile;\n' +
|
||||
"\treturn {\n" +
|
||||
"\t\tprofile,\n" +
|
||||
'\t\tlock: join(profile, "lock")\n' +
|
||||
"\t};\n" +
|
||||
"}",
|
||||
},
|
||||
],
|
||||
markers: ['const webProfile = join(dshHome, "profiles", "web")'],
|
||||
},
|
||||
{
|
||||
id: 46, name: "OFFICIAL_DESKTOP_UPDATE_ASCII", layer: "代码", layer_en: "Code",
|
||||
desc: "已接管的官方桌面更新改为 ASCII 脚本,中文 Windows 不再吞掉换行",
|
||||
|
||||
Reference in new issue
Block a user