feat: 重构问问微信并完善知识库增量检索

统一问问微信与 Agent Hub 的查询链路
完善查询覆盖度、新鲜度和部分结果表达,避免索引滞后产生错误结论
基于会话实现真正的增量追新与历史补齐
支持后台同步、取消恢复、重启续传以及同步期间继续查询
优化知识库跨会话检索、同步状态、进度展示和侧栏布局
This commit is contained in:
Wxw-Gu
2026-09-11 17:44:48 +08:00
parent 0c4932d740
commit ab3b3731b7
69 changed files with 8317 additions and 898 deletions
+9 -2
View File
@@ -71,8 +71,15 @@ describe('AISearchComposer', () => {
expect(props.onHistoryOpenChange).toHaveBeenCalledWith(false)
})
it('disables submission while Knowledge is syncing', () => {
it('keeps submission available while Knowledge is syncing and only warns about coverage', () => {
// 知识库同步是后台 / 可取消 / 可断点续传的,**不允许**因此禁止提问。
// 索引没追平时应由 coverage/freshness 契约如实标注覆盖范围。
renderComposer({ knowledgeSyncing: true })
expect(screen.getByRole('button', { name: /同步中,暂不可分析/ })).toBeDisabled()
const submit = screen.getByRole('button', { name: /开始分析/ })
expect(submit).toBeEnabled()
expect(screen.queryByRole('button', { name: /暂不可分析/ })).not.toBeInTheDocument()
expect(
screen.getByText('知识库后台同步中 · 仍可提问,答案会标注覆盖范围')
).toBeInTheDocument()
})
})