mirror of
https://github.com/YuJunZhiXue/dsh-purge.git
synced 2026-11-28 04:50:22 +08:00
fix: 发布 1.1.48,桌面跟 Web 配置、红队派活与 skill/MCP 按任务选用。
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
33baeeef45
commit
eb09b2e62d
12 files changed
+389
-38
No files matched your search
+51
-1
@@ -1744,6 +1744,12 @@ 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 };
|
||||
}
|
||||
@@ -1863,6 +1869,10 @@ 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);
|
||||
}
|
||||
@@ -2570,7 +2580,7 @@ const NEW_TOOL_PATCHES = [
|
||||
id: 23, name: "SUBAGENT_MAXDEPTH_RAISED", layer: "代码", layer_en: "Code",
|
||||
desc: "子代理深度默认 3 → 10 / subagent maxDepth raised",
|
||||
// 0.1.7 起深度默认在工具参数上(dsh-tool-subagent);旧版在 dsh-subagent 服务配置上。
|
||||
// 两个 key 都列,命中哪个都能抬高递归预算。
|
||||
// 0.2 起 tool-subagent 的 maxDepth 可能没有 .default(3),补回 default(10)。
|
||||
file: ["subagent", "tool-subagent"],
|
||||
rel: ["lib", "index.js"],
|
||||
replacements: [
|
||||
@@ -2581,6 +2591,13 @@ const NEW_TOOL_PATCHES = [
|
||||
replace:
|
||||
'maxDepth: z.union([z.natural().max(Number.MAX_SAFE_INTEGER), z.const("provider-managed")]).default(10) // [dsh-purge] subagent depth raised',
|
||||
},
|
||||
{
|
||||
// 0.2:schema 去掉了 default,官方 preset 又不写 maxDepth;补回 default(10)。
|
||||
pattern:
|
||||
'maxDepth: z.union([z.natural().max(Number.MAX_SAFE_INTEGER), z.const("provider-managed")])\n});',
|
||||
replace:
|
||||
'maxDepth: z.union([z.natural().max(Number.MAX_SAFE_INTEGER), z.const("provider-managed")]).default(10) // [dsh-purge] subagent depth raised\n});',
|
||||
},
|
||||
{
|
||||
// 0.1.5/0.1.6 时代:数值 schema,默认 1。
|
||||
pattern:
|
||||
@@ -3325,6 +3342,39 @@ 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