fix: 1.1.11 系统提示词只注入一次,后续不再每步追加

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
叫我小杨同学andCursor committed 2026-09-21 10:34:17 +08:00
1 parent fd631154f2
commit c743a64d13
5 files changed
+61 -20

No files matched your search

+2 -1
View File
@@ -222,7 +222,7 @@ function installIdentityOverride(ctx, config = {}) {
if (typeof ctx.on !== "function") return;
if (ctx.__dshPurgeAssembleHook) return;
ctx.__dshPurgeAssembleHook = true;
const hook = async (_assembly, _context, next) => {
const hook = async (_assembly, context, next) => {
const assembled = typeof next === "function" ? await next() : _assembly;
const enabled = config.enabled !== false;
const inject = enabled ? readInjectFallback() : "";
@@ -230,6 +230,7 @@ function installIdentityOverride(ctx, config = {}) {
fallbackInject: inject,
dropMnemon: config.stripMnemon !== false,
dropPurgeAfterFold: true,
context,
});
};
// 只挂一次:挂多次会让同一轮 assemble 折两遍,UI 也会显示两次注入。