fix: 工作目录字面量恢复 + 桌面退出留痕,版本 1.1.89(#202/#204/#207)

This commit is contained in:
叫我小杨同学 committed 2026-11-02 14:07:45 +08:00
1 parent d1eff01eb6
commit c63ba4a720
6 files changed
+185 -50

No files matched your search

+2 -2
View File
@@ -19,6 +19,7 @@ import {
modePromptText,
peelChatmlEnvelope,
escapeDshInterpolation,
resolveCwdFromContext,
rewritePromptAssembly,
} from "./identity.js";
import { capabilityProtocolText, CAPABILITY_SECTION } from "./capability-protocol.js";
@@ -623,8 +624,7 @@ function rewriteLiveAssembly(config, assembled, context, decision = { mode: "ful
const redteam = sigRedteam;
const full = enabled ? readInjectFallback(context) : "";
const dshHome = sigHome;
let cwd = "";
try { cwd = String(context?.agent?.session?.header?.cwd || "").trim(); } catch { /* ignore */ }
const cwd = resolveCwdFromContext(context);
if (dshHome && cwd) {
try { rules.writeLastCwd(dshHome, cwd); } catch { /* ignore */ }
}