适配 DSH 0.2.3-alpha.2:补齐提示词段 order、修复 minimal 自定义子代理阴影覆盖并更新实景校验

This commit is contained in:
yexi committed 2026-11-25 19:32:08 +08:00
1 parent 7b4b01339b
commit 3d7177dcb9
5 files changed
+90 -27

No files matched your search

+3 -1
View File
@@ -252,6 +252,8 @@ export function fuseSections(sections, presetId, { isSubagent = false, allowDyna
const personaIndex = fused.findIndex(section => section.name === 'deployment:persona-prefix')
const identityIndex = fused.findIndex(section => section.name === 'harness:identity')
const insertAt = personaIndex >= 0 ? personaIndex + 1 : (identityIndex >= 0 ? identityIndex + 1 : 0)
fused.splice(insertAt, 0, { name: BLOCK_SECTION, text: EXECUTION_MODE_BLOCK })
const anchor = personaIndex >= 0 ? fused[personaIndex] : (identityIndex >= 0 ? fused[identityIndex] : undefined)
const blockOrder = typeof anchor?.order === 'number' && Number.isFinite(anchor.order) ? anchor.order + 1 : 101
fused.splice(insertAt, 0, { name: BLOCK_SECTION, order: blockOrder, text: EXECUTION_MODE_BLOCK })
return { sections: fused }
}