✨ feat(vscode): 问 AI 输入框旁边能选 Claude profile,记住上次选的,问答灰字写用哪个 profile 答的
This commit is contained in:
1 parent
1eb42d8389
commit
9efae1f496
20 files changed
+397
-63
No files matched your search
@@ -113,6 +113,16 @@ describe('读写 .spx/code-qa.json', () => {
|
||||
})
|
||||
})
|
||||
|
||||
it('用哪个 profile 答的跟着这条存、读得回来;以前存的、选「默认」答的没有这一项,空的、不是字符串的当没有', async () => {
|
||||
const sonnet: QaEntry = { ...entry('p', '2026-09-26T10:00:00.000Z'), profile: 'sonnet' }
|
||||
const map = withEntry(withEntry({}, 'a.py', IF, sonnet), 'a.py', IF, entry('old', '2026-09-25T10:00:00.000Z'))
|
||||
await writePathMap(root, QA_FILE, map)
|
||||
expect(await fsp.readFile(qaFile(), 'utf8')).toContain('"profile": "sonnet"')
|
||||
expect(await readPathMap(root, QA_FILE)).toEqual(map)
|
||||
await writeRaw({ 'a.py': [{ anchor: IF, entries: [{ ...entry('x', '2026-09-25T10:00:00.000Z'), profile: '' }, { ...entry('y', '2026-09-26T10:00:00.000Z'), profile: 3 }] }] })
|
||||
expect(await readPathMap(root, QA_FILE)).toEqual({ 'a.py': [{ anchor: IF, entries: [entry('x', '2026-09-25T10:00:00.000Z'), entry('y', '2026-09-26T10:00:00.000Z')] }] })
|
||||
})
|
||||
|
||||
it('手改过的顺序、重复的块读进来整理好', async () => {
|
||||
await writeRaw({ 'a.py': [
|
||||
{ anchor: IF, entries: [entry('b', '2026-09-26T10:00:00.000Z')] },
|
||||
|
||||
Reference in new issue
Block a user