chore: stabilize Zhinian pilot delivery

This commit is contained in:
inman
2026-05-12 19:44:44 +08:00
parent 45389855e1
commit 20b5aff4ad
174 changed files with 41428 additions and 784 deletions

View File

@@ -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('帮我总结一下这份资料');
});
});