in src/controller/commentController.ts [281:297]
private async loadCommentsFromCache() {
const comments =
await this.commentCacheController.getCachedCommentIterator();
const pairs = new Set<{ uri: vscode.Uri; range: vscode.Range }>();
for (const comment of comments) {
const { uri, lineNumber } = comment;
const { startLine, endLine } = RangeHelper.splitString(lineNumber);
const endCharacter = (
await this.directoryController.getLineFromFile(uri, endLine)
).length;
const range = RangeHelper.fromNumber(startLine, endLine, endCharacter);
pairs.add({ uri, range });
}
for (const { uri, range } of pairs) {
this.createComment(uri, range);
}
}