fix: 发布 1.1.44,回退后下一句按新消息发,启动就注入默认提示词。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
叫我小杨同学andCursor committed 2026-10-01 20:36:12 +08:00
1 parent 3c7c234b34
commit b8a5171d78
5 files changed
+138 -20

No files matched your search

+19
View File
@@ -294,6 +294,24 @@ function installFreshFullAccess(ctx) {
} catch {}
}
function installRewindDeriveFilter(ctx) {
if (!ctx || ctx.__dshPurgeRewindDerive) return;
ctx.__dshPurgeRewindDerive = true;
const wrapOne = (session) => {
try { rewind.wrapSessionDeriveMessages(session); } catch { /* ignore */ }
};
try {
const store = ctx.get?.("sessions");
const all = typeof store?.all === "function" ? store.all()
: typeof store?.list === "function" ? store.list()
: [];
for (const session of all || []) wrapOne(session);
} catch { /* ignore */ }
try {
ctx.on("session/created", (session) => wrapOne(session));
} catch { /* ignore */ }
}
function installIdentityOverride(ctx, config = {}) {
if (typeof ctx.on !== "function") return;
installSubagentRoleCapture(ctx);
@@ -798,6 +816,7 @@ export function apply(ctx, config) {
installIdentityOverride(ctx, cfg);
installRegionGate(ctx);
installFreshFullAccess(ctx);
installRewindDeriveFilter(ctx);
installMnemonMessageStrip(ctx, cfg);
const injectFile = core.findOverrideFile(core.findDshHome());
registerPromptSections(ctx, cfg, injectFile);