feat: enhance local knowledge retrieval

This commit is contained in:
lofyer
2026-08-12 21:45:47 +08:00
parent e0e5a8c1b3
commit 111f487e20
65 changed files with 13517 additions and 1155 deletions
+4 -2
View File
@@ -287,7 +287,7 @@ describe('ContextManager', () => {
expect(attachment).toMatchObject({
name: '需求说明.docx',
kind: 'text',
preview: '[正文] Word 需求正文'
preview: '[正文 · 段落 1] Word 需求正文'
})
expect(showOpenDialog).toHaveBeenCalledWith(
expect.anything(),
@@ -326,7 +326,9 @@ describe('ContextManager', () => {
contextIds: [attachment!.id]
}).prompt
expect(prompt).toContain('Word 需求正文')
expect(prompt).toContain('"content":"[正文]\\nWord 需求正文"')
expect(prompt).toContain(
'"content":"[正文 · 段落 1]\\nWord 需求正文"'
)
})
it('keeps all five explicitly selected images', async () => {