fix: 修复 AI 检索 Evidence 覆盖与加载更多问题

修复问一问微信查询遗漏群聊的问题
区分会话覆盖与发送者覆盖策略
新增问一问微信加载更多功能
This commit is contained in:
Wxw-Gu
2026-08-18 14:19:28 +08:00
parent 15811c820c
commit f93dc539e4
14 changed files with 484 additions and 65 deletions
@@ -114,6 +114,20 @@ describe('KnowledgeSearchService legacy fallback', () => {
await service.dispose()
})
it('accepts username and Chat_<md5> aliases in the legacy fallback scope', async () => {
const service = new KnowledgeSearchService('/tmp/wxe-knowledge-fallback', '/missing-worker.js')
const result = await service.search({
text: 'Knowledge Worker fallback',
terms: ['Knowledge Worker', 'fallback'],
conversationIds: ['fixture-contact', 'Chat_fixture-conversation'],
limit: 10
})
expect(listMessagesAsync).toHaveBeenCalledWith('fixture-conversation', undefined, undefined)
expect(result.evidence).toHaveLength(1)
await service.dispose()
})
it('hydrates a cached voice transcript and incrementally indexes only its conversation', async () => {
chatState.ready = true
chatState.accountId = 'C:/fixtures/account-a'