Merge pull request 'fix(ai): 规划提示词补回用户要求——指令此前从未发送给模型' (#13) from fix/planner-missing-instruction into main

This commit was merged in pull request #13.
This commit is contained in:
xhgit committed 2026-11-14 07:06:20 +00:00
commit ad2a2ba704
2 files changed
+5

No files matched your search

+3
View File
@@ -162,6 +162,9 @@ remove {"type":"remove","id":"已有片段 ID"}。
9. 片段描述是采样观察结果,可能不完整;不确定时优先选择 score 更高的片段,并在 summary 中说明取舍。
10. 用户指令中的「这个 / 那个 / 现在 / 全部」等指代必须结合对话记录理解;只要对话记录中有可执行的要求,就不得以「未收到具体要求」为由返回空方案。只有确实无法执行时才返回空 operations。没有台词转写数据时,不要虚构字幕台词。
用户本次要求(需要执行的剪辑指令,必须据此操作):
${instruction}
${styleBlock}
${targetBlock}
${historySection}
+2
View File
@@ -39,6 +39,8 @@ test('规划提示词:按评分筛选片段、丢弃占位描述、区分新
]}});
const p={settings:{width:1920,height:1080,fps:30},media:[mk('a',90),mk('b',40)],clips:[{id:'c1',mediaId:'a',track:'video',start:0,in:0,out:5,speed:1,volume:1,motion:[{time:0,zoom:1,x:.5,y:.5}],text:'旧字幕'}]};
const fresh=plannerPrompt(p,'制作一个旅行短片',{fresh:true,target:45,style:getStyle('cinematic'),budget:9000});
assert.ok(fresh.includes('用户本次要求'));
assert.ok(fresh.includes('制作一个旅行短片'),'用户指令必须出现在提示词中');
assert.ok(fresh.includes('海滩日落'));
assert.ok(fresh.includes('城市夜景'));
assert.ok(!fresh.includes('尚未进行语义或动作识别'));