fix: 发布 1.1.38,红队守住目标并修好模式不显示

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
叫我小杨同学andCursor committed 2026-09-29 18:15:28 +08:00
1 parent 4a51f9841c
commit 53d472f3c7
31 files changed
+1037 -949

No files matched your search

+14
View File
@@ -11,6 +11,11 @@ import {
isMnemonPluginMessage,
rewritePromptAssembly,
} from "./identity.js";
import {
installSubagentRoleCapture,
resolveSubagentRoleText,
} from "./redteam/role-section.js";
import { readObjectiveCard } from "./redteam/objective-card.js";
import * as rewind from "./rewind.js";
import * as continueRetry from "./continue-retry.js";
import * as uninstaller from "./uninstall.js";
@@ -231,16 +236,25 @@ function installMnemonMessageStrip(ctx, config = {}) {
function rewriteLiveAssembly(config, assembled, context) {
const enabled = config.enabled !== false;
const inject = enabled ? readInjectFallback() : "";
let roleText = "";
let cardText = "";
if (enabled) {
try { roleText = resolveSubagentRoleText(context); } catch { roleText = ""; }
try { cardText = readObjectiveCard(); } catch { cardText = ""; }
}
return rewritePromptAssembly(assembled, {
fallbackInject: inject,
dropMnemon: config.stripMnemon !== false,
dropPurgeAfterFold: false,
context,
roleText,
cardText,
});
}
function installIdentityOverride(ctx, config = {}) {
if (typeof ctx.on !== "function") return;
installSubagentRoleCapture(ctx);
if (ctx.__dshPurgeAssembleHook) return;
ctx.__dshPurgeAssembleHook = true;
const hook = async (_assembly, context, next) => {