mirror of
https://github.com/YuJunZhiXue/dsh-purge.git
synced 2026-11-28 06:40:22 +08:00
fix: 发布 1.1.21,修复 #43、#9、#15、#23、#42 报必需补丁失败
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
978538f0ae
commit
4538da436d
7 files changed
+55
-26
No files matched your search
+3
-1
@@ -3827,6 +3827,8 @@ function rollupPatchStatus({ applied, already, missing, notFound, lastError, key
|
||||
if (already > 0 && (notFound === 0 || layoutSoft)) return "already";
|
||||
if (missing === keyCount) return "missing_file";
|
||||
if (lastError) return lastError;
|
||||
// 文件在,但这份原文不在:列表里本来就是跳过,不能再把整次应用判失败。
|
||||
if (notFound === 0) return "skipped";
|
||||
return "pattern_not_found";
|
||||
}
|
||||
|
||||
@@ -3923,7 +3925,7 @@ export async function applyPatches(aiBase, patches = ALL_PATCHES) {
|
||||
}
|
||||
if (filePatchSettled(text, p, fp)) {
|
||||
already += 1;
|
||||
} else {
|
||||
} else if (patchHasRemainingWork(text, p, fp)) {
|
||||
notFound += 1;
|
||||
}
|
||||
}
|
||||
|
||||
+9
-6
@@ -63,7 +63,11 @@ function isSubPath(child, root) {
|
||||
return c === r || c.startsWith(`${r}/`);
|
||||
}
|
||||
|
||||
/** 文件夹名带 DSH Desktop / dsh-desktop 时,任意盘符都算桌面安装树。 */
|
||||
/**
|
||||
* 社区桌面、官方 exe、.app 包才算安装树。
|
||||
* 只是上级文件夹叫 DeepSeek Harness 不算:npm 前缀和配置目录经常用这个名字,
|
||||
* 按名字整棵排除的话,Web 的身份句和 complete 注入补丁会被跳过。
|
||||
*/
|
||||
export function looksLikeDesktopName(p) {
|
||||
const n = slashNorm(p);
|
||||
if (!n) return false;
|
||||
@@ -73,12 +77,11 @@ export function looksLikeDesktopName(p) {
|
||||
n.endsWith("/dsh desktop") ||
|
||||
n.endsWith("/dsh desktop.app") ||
|
||||
n.includes("dsh-desktop") ||
|
||||
n.includes("/deepseek harness/") ||
|
||||
n.includes("/deepseek harness.app/") ||
|
||||
n.endsWith("/deepseek harness") ||
|
||||
n.includes("deepseek-harness") ||
|
||||
n.endsWith("/deepseek harness.app") ||
|
||||
/\/dsh desktop\.exe$/i.test(n) ||
|
||||
/\/deepseek harness\.exe$/i.test(n)
|
||||
/\/deepseek harness\.exe$/i.test(n) ||
|
||||
/\/deepseek-harness\.exe$/i.test(n)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -304,7 +307,7 @@ export function listDesktopInstallRoots(input = {}) {
|
||||
/**
|
||||
* 是否落在社区 Desktop 安装树。
|
||||
* 不依赖盘符、也不要求文件夹叫 “DSH Desktop”:
|
||||
* 当前进程的 exe / resources / host-process-entry、旁边真有 DSH Desktop.exe、或名字启发式。
|
||||
* 当前进程的 exe / resources / host-process-entry、旁边真有桌面 exe,或社区安装目录名。
|
||||
*/
|
||||
export function isInsideDesktopInstall(p, input = {}) {
|
||||
if (!p) return false;
|
||||
|
||||
Reference in new issue
Block a user