🐛 fix(vscode): 切走标签再回来,调用树棵数不用重算,开着的弹框和选中的入口照旧

This commit is contained in:
cruldra committed 2026-10-13 11:00:06 +11:00
1 parent 6cf053dcd0
commit 32018e71f1
9 files changed
+542 -110

No files matched your search

@@ -185,7 +185,7 @@ class Preview {
visibleLine: number | undefined
/** 最近一次发出去的文档(版本、块树、源码):问 AI 时按块的记号在里面找那块代码,对比基准变了时拿它重新比 */
private sent: SentDocument | undefined
/** 能看调用树的块(函数、类、接口卡片)落在几棵调用树里。文档发出去之后再数,不挡住第一次预览 */
/** 能看调用树的块(函数、类、接口卡片)落在几棵调用树里。文档发出去之后再数,不挡住第一次预览;同一版文档数过的页面重新加载后接着用 */
private readonly callTrees = new CallTreeSession(
message => this.post(message),
() => {
@@ -358,7 +358,6 @@ class Preview {
if (!this.ready)
return
const request = ++this.latest
this.callTrees.cancel()
// 路径页、功能对话页:文档是空的,只在顶部聊天
if (this.document.uri.scheme === PATH_PREVIEW_SCHEME) {
this.sent = undefined
@@ -401,7 +400,7 @@ class Preview {
this.names.resolve(version, report => resolveNames(displayNames, message.blocks, this.nameSources(), report))
this.lookups.resolve(version, session.requests(), this.lookupSources())
this.callees.resolve(version, callees.requests(), offset => this.calleeKind(offset))
this.callTrees.refresh()
this.callTrees.documentSent()
}
}