✨ feat(vscode): 接口卡片的调用树认得出包了一层 fetch 的函数(authedFetch 这类),跨文件、多层、路径别名导入都算

This commit is contained in:
cruldra committed 2026-10-13 13:03:00 +11:00
1 parent 78aa71ffd0
commit cb561d23ad
11 files changed
+683 -64

No files matched your search

+5 -1
View File
@@ -60,6 +60,9 @@ export interface WorkspaceIndexOf<E extends IndexEntry> extends WorkspaceIndex {
entries: (root: Node, file: IndexedFile) => E[]
}
/** 查工作区索引里键是 key 的各项(宿主是 WorkspaceIndexes.find)。 */
export type IndexFind = <E extends IndexEntry>(index: WorkspaceIndexOf<E>, key: string) => Promise<IndexedEntry<E>[]>
/** 一份看过的文件:认出的各项,和建索引时问过在不在的文件(它们新建、删掉时这份要重看)。 */
interface Indexed<E extends IndexEntry> {
file: WorkspaceFile
@@ -67,7 +70,8 @@ interface Indexed<E extends IndexEntry> {
asked: Set<string>
}
function compareLocations(a: RuleLocation, b: RuleLocation): number {
/** 照文件、行、列排。 */
export function compareLocations(a: RuleLocation, b: RuleLocation): number {
return a.uri.localeCompare(b.uri) || a.start.line - b.start.line || a.start.character - b.start.character
}