✨ feat(vscode): 问 AI 收起再展开、重启后接着这块最近的会话问;代码改了对不上的问答不再显示
This commit is contained in:
1 parent
cbe447ade8
commit
f0a3ad80e1
16 files changed
+82
-211
No files matched your search
@@ -3,7 +3,7 @@ import type { Ask } from './qa'
|
||||
import type { QaEntryView } from './types'
|
||||
import { renderToStaticMarkup } from 'react-dom/server'
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import { AskThread, OrphanThreads } from './AskThread'
|
||||
import { AskThread } from './AskThread'
|
||||
|
||||
const NOW = new Date(2026, 8, 26, 15, 0).getTime()
|
||||
|
||||
@@ -68,19 +68,3 @@ describe('块下面的问答区', () => {
|
||||
expect(text(render({ open: true, asks: [ask({})] }))).toContain('正在想…')
|
||||
})
|
||||
})
|
||||
|
||||
describe('找不到原来位置的问答', () => {
|
||||
it('灰字一栏:写着原来在哪,问答照样能删', () => {
|
||||
const html = renderToStaticMarkup(
|
||||
<OrphanThreads
|
||||
threads={[{ anchor: 'function display > if @1', where: [{ kind: 'function', name: 'display' }, { kind: 'if' }], entries: HISTORY }]}
|
||||
kindName={kind => ({ function: '函数', if: '条件' })[kind] ?? kind}
|
||||
now={NOW}
|
||||
onDelete={() => {}}
|
||||
/>,
|
||||
)
|
||||
expect(text(html)).toContain('代码改动后找不到原来位置的问答 · 2 条')
|
||||
expect(text(html)).toContain('原来在:函数 display › 条件')
|
||||
expect(html.match(/aria-label="已理解,删除"/g)).toHaveLength(2)
|
||||
})
|
||||
})
|
||||
Reference in new issue
Block a user