mirror of
https://github.com/yexi-by/dsh-unrestricted.git
synced 2026-11-30 02:40:22 +08:00
适配 DSH 0.2.3-alpha.2:补齐提示词段 order、修复 minimal 自定义子代理阴影覆盖并更新实景校验
This commit is contained in:
1 parent
7b4b01339b
commit
3d7177dcb9
5 files changed
+90
-27
No files matched your search
+3
-1
@@ -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 }
|
||||
}
|
||||
Reference in new issue
Block a user