mirror of
https://github.com/YuJunZhiXue/dsh-purge.git
synced 2026-11-28 13:00:22 +08:00
fix: 发布 1.1.38,红队守住目标并修好模式不显示
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
4a51f9841c
commit
53d472f3c7
31 files changed
+1037
-949
No files matched your search
+6
-6
@@ -1581,9 +1581,9 @@ export function missingAiBaseMessage() {
|
||||
if (adapterFor(detectSurface()) === "desktop") {
|
||||
const exe = desktop.findDesktopAppExecutable();
|
||||
if (exe) {
|
||||
const asar = path.join(path.dirname(exe), "resources", "app.asar");
|
||||
const asar = desktop.appAsarPath(exe);
|
||||
if (asarArchiveIsFile(asar) && desktop.isOfficialHarnessExecutable(exe)) {
|
||||
return `已找到 ${exe}。官方宿主在 app.asar 里,点「应用」会解开 resources\\app 并自动重启,不用另跑脚本。`;
|
||||
return `已找到 ${exe}。官方宿主在 app.asar 里,点「应用」会解开 ${desktop.appDirForExecutable(exe)} 并自动重启,不用另跑脚本。`;
|
||||
}
|
||||
return `已找到桌面应用 ${exe},但其 resources/app(或 app.asar.unpacked)下没有 @deepseek-ai`;
|
||||
}
|
||||
@@ -1608,7 +1608,7 @@ export function sealedAsarHandoff(input = {}) {
|
||||
? path.normalize(hinted)
|
||||
: desktop.findDesktopAppExecutable(input);
|
||||
if (!exe || !desktop.isOfficialHarnessExecutable(exe)) return null;
|
||||
const asar = path.join(path.dirname(exe), "resources", "app.asar");
|
||||
const asar = desktop.appAsarPath(exe);
|
||||
if (!asarArchiveIsFile(asar)) return null;
|
||||
return { exe, asar, swapAsar: true };
|
||||
}
|
||||
@@ -1617,7 +1617,7 @@ export function sealedAsarHandoff(input = {}) {
|
||||
export async function openSealedDesktopHost(options = {}) {
|
||||
const handoff = sealedAsarHandoff();
|
||||
if (!handoff) return { aiBase: null, swapAsar: false };
|
||||
const appDir = path.join(path.dirname(handoff.exe), "resources", "app");
|
||||
const appDir = desktop.appDirForExecutable(handoff.exe);
|
||||
let aiBase = options.forceExtract ? null : aiBaseUnderAppDir(appDir);
|
||||
if (!aiBase) {
|
||||
await extractAsar(handoff.asar, appDir);
|
||||
@@ -1625,7 +1625,7 @@ export async function openSealedDesktopHost(options = {}) {
|
||||
}
|
||||
overlayAsarUnpacked(handoff.asar, appDir);
|
||||
if (!aiBase) {
|
||||
throw new Error(`已解开 ${handoff.asar},但 resources\\app 下没有 @deepseek-ai`);
|
||||
throw new Error(`已解开 ${handoff.asar},但 ${appDir} 下没有 @deepseek-ai`);
|
||||
}
|
||||
resetPathMemo();
|
||||
return { aiBase, swapAsar: true, exe: handoff.exe, asar: handoff.asar };
|
||||
@@ -3220,7 +3220,7 @@ function officialShellMain() {
|
||||
try {
|
||||
const exe = desktop.findDesktopAppExecutable();
|
||||
if (!exe || !desktop.isOfficialHarnessExecutable(exe)) return "";
|
||||
const main = path.join(path.dirname(exe), "resources", "app", "lib", "main.js");
|
||||
const main = path.join(desktop.appDirForExecutable(exe), "lib", "main.js");
|
||||
return fs.existsSync(main) ? main : "";
|
||||
} catch {
|
||||
return "";
|
||||
|
||||
Reference in new issue
Block a user