MCPcopy Create free account
hub / github.com/CatMuse/HiNote / getFileHighlights

Method getFileHighlights

src/services/ExportService.ts:132–140  ·  view source on GitHub ↗

* 获取文件的所有高亮和评论

(file: TFile)

Source from the content-addressed store, hash-verified

130 * 获取文件的所有高亮和评论
131 */
132 private async getFileHighlights(file: TFile): Promise<HighlightInfo[]> {
133 const content = await this.app.vault.read(file);
134 const highlights = this.highlightService.extractHighlights(content, file);
135
136 // 获取已存储的评论
137 const storedComments = this.highlightRepository.getCachedHighlights(file.path) || [];
138
139 return this.highlightService.mergeHighlightsWithComments(highlights, storedComments, file);
140 }
141
142 /**
143 * 生成导出内容

Callers 1

Calls 3

getCachedHighlightsMethod · 0.65
extractHighlightsMethod · 0.45

Tested by

no test coverage detected