fix: keep teacher runtime prompts within interface boundary
This commit is contained in:
@@ -30,13 +30,14 @@ describe('published guidance and text reply wiring', () => {
|
||||
expect(system).toContain('启用的教学补充');
|
||||
expect(system).not.toContain('不应加载的资料');
|
||||
expect(compiled.messages.map(message => message.content).join('\n'))
|
||||
.not.toMatch(/你是麦洛的创作老师|Alice|最多120字|不超过400字|2–3|学生自己的口吻/);
|
||||
.not.toMatch(/你是麦洛的创作老师|Alice|最多120字|不超过400字|2–3|学生自己的口吻|推荐一个具体切入点|说明为何|快捷回复围绕|整理想法|理解关系|承接已确认的共识/);
|
||||
expect(definition).toEqual(before);
|
||||
expect(compiled.messages.at(-1)?.role).toBe(intent === 'check-in' ? 'system' : 'user');
|
||||
if (instructions) expect(compiled.messages.at(-2)).toEqual({ role: 'system', content: instructions });
|
||||
if (intent === 'suggestions' || intent === 'guided-help') {
|
||||
expect(compiled.messages.at(-1)?.content).toContain('推荐一个具体切入点');
|
||||
}
|
||||
const entry = compiled.messages.at(-1)?.content;
|
||||
if (intent === 'suggestions') expect(entry).toContain('学生通过“帮我看看”主动请求帮助');
|
||||
if (intent === 'guided-help') expect(entry).toContain('学生主动求助,表示暂时说不清想问什么');
|
||||
if (intent === 'check-in') expect(entry).toContain('程序触发的项目进展检查,学生没有在本轮主动提问');
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user