mirror of
https://github.com/YuJunZhiXue/dsh-purge.git
synced 2026-11-28 10:40:22 +08:00
fix: 发布 1.1.65,截图报告与默认提示词
接入上游截图登记和六段报告,默认提示词按当前文稿重新加密。缺外部工具或密钥时技能仍可加载。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
ed676bcb11
commit
2bf8bfb618
20 files changed
+1616
-753
No files matched your search
@@ -698,37 +698,6 @@ export function resolveDesktopAiBase(input = {}) {
|
||||
return listDesktopPackageRoots(input)[0] || null;
|
||||
}
|
||||
|
||||
export function resolveDesktopCliScript(input = {}) {
|
||||
const exe = findDesktopAppExecutable(input);
|
||||
if (exe) {
|
||||
const resources = resourcesDirForExecutable(exe);
|
||||
const packed = path.join(resources, "app", "lib", "desktop-cli.js");
|
||||
if (isFile(packed)) return path.normalize(packed);
|
||||
const unpacked = path.join(resources, "app.asar.unpacked", "lib", "desktop-cli.js");
|
||||
if (isFile(unpacked)) return path.normalize(unpacked);
|
||||
}
|
||||
for (const arg of input.argv ?? process.argv) {
|
||||
if (typeof arg === "string" && /desktop-cli\.js$/i.test(arg) && isFile(arg)) {
|
||||
return path.normalize(path.resolve(arg));
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
export function cliInvocation(input = {}) {
|
||||
const exe = findDesktopAppExecutable(input);
|
||||
const cli = resolveDesktopCliScript(input);
|
||||
if (!exe || !cli) return null;
|
||||
return {
|
||||
execPath: exe,
|
||||
argvPrefix: ["--expose-internals", cli],
|
||||
env: {
|
||||
ELECTRON_RUN_AS_NODE: "1",
|
||||
DSH_DESKTOP_DEFAULT_PROFILE: "desktop",
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
export function isSealedRuntimeDir(dir) {
|
||||
if (!dir) return false;
|
||||
const n = path.normalize(dir).replace(/\\/g, "/").toLowerCase();
|
||||
@@ -1108,12 +1077,6 @@ function officialExeFromProcess() {
|
||||
return "";
|
||||
}
|
||||
|
||||
/** 密封包换走 app.asar 用哪条。Windows 有 JScript 才用 wscript,否则 PowerShell。Linux 和 macOS 用重启脚本。 */
|
||||
export function sealedSwapEngine(platform = process.platform, wshJs = false) {
|
||||
if (platform === "win32") return wshJs ? "wscript" : "powershell";
|
||||
return "helper";
|
||||
}
|
||||
|
||||
function dshHomeForRelaunch() {
|
||||
const current = String(process.env.DSH_HOME || "").replace(/[\\/]+$/, "");
|
||||
if (!current) return "";
|
||||
|
||||
Reference in new issue
Block a user