chore: stabilize Zhinian pilot delivery
This commit is contained in:
@@ -17,4 +17,18 @@ describe('chat message display cleanup', () => {
|
||||
|
||||
expect(extractText({ role: 'user', content })).toBe('');
|
||||
});
|
||||
|
||||
it('hides injected knowledge context from user display text', () => {
|
||||
const content = [
|
||||
'帮我总结一下这份资料',
|
||||
'',
|
||||
'[知识库上下文]',
|
||||
'用户已选择在本轮对话中使用当前组织空间知识库。',
|
||||
'',
|
||||
'## 内部资料.docx',
|
||||
'这是一段不应该出现在用户气泡里的知识库正文。',
|
||||
].join('\n');
|
||||
|
||||
expect(extractText({ role: 'user', content })).toBe('帮我总结一下这份资料');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user