feat: 收敛 AI Search 检索边界与问答体验

This commit is contained in:
电摇小子
2026-08-06 20:29:48 +08:00
parent ad4b3a8074
commit a0e8ab278f
22 changed files with 1897 additions and 127 deletions
+12
View File
@@ -0,0 +1,12 @@
import { describe, expect, it } from 'vitest'
import { markdownToPlainText } from '../../src/renderer/src/components/search/searchMarkdown'
describe('AI Search Markdown clipboard text', () => {
it('removes presentation markup while retaining structure and evidence references', () => {
expect(
markdownToPlainText(
'## 摘要\n\n**结论**:查看 `训练安排` [E1]\n\n- *训练时间*:中午\n- [详情](https://example.test)'
)
).toBe('摘要\n\n结论:查看 训练安排 [E1]\n\n• 训练时间:中午\n• 详情 (https://example.test)')
})
})