✨ feat(vscode): 问 AI 收起再展开、重启后接着这块最近的会话问;代码改了对不上的问答不再显示

This commit is contained in:
cruldra committed 2026-09-26 21:25:22 +08:00
1 parent cbe447ade8
commit f0a3ad80e1
16 files changed
+82 -211

No files matched your search

+1 -10
View File
@@ -3,7 +3,7 @@ import { describe, expect, it } from 'vitest'
import { toBlockViews } from '../blockView'
import { createPythonAdapter } from '../languages/python'
import { WASM_DIR, withBlocks } from '../testSupport'
import { anchorSteps, BlockAnchors } from './anchor'
import { BlockAnchors } from './anchor'
const py = createPythonAdapter(WASM_DIR)
@@ -83,15 +83,6 @@ describe('块的位置记号', () => {
expect(anchorOf(after, 'def helper(x, y=1):')).toBe(anchorOf(before, 'def helper(x):'))
})
it('拆回各层:没名字的一层只有种类,编号去掉', () => {
expect(anchorSteps('class ReferralRelation > function display[1] > if @3fa1c2d0[2]')).toEqual([
{ kind: 'class', name: 'ReferralRelation' },
{ kind: 'function', name: 'display' },
{ kind: 'if' },
])
expect(anchorSteps('variable { a, b }')).toEqual([{ kind: 'variable', name: '{ a, b }' }])
})
it('名字里的空白压成一个空格,空名字按没名字算', () => {
const anchors = new BlockAnchors()
expect(anchors.place('', 'variable', '{\n a,\n b\n}', '').anchor).toBe('variable { a, b }')