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

Method checkHasFlashcard

src/services/comment/CommentService.ts:275–283  ·  view source on GitHub ↗

* 检查高亮是否已经创建了闪卡

(highlightId: string)

Source from the content-addressed store, hash-verified

273 * 检查高亮是否已经创建了闪卡
274 */
275 private checkHasFlashcard(highlightId: string): boolean {
276 const fsrsManager = this.plugin.fsrsManager;
277 if (!fsrsManager || !highlightId) {
278 return false;
279 }
280
281 const cards = fsrsManager.findCardsBySourceId(highlightId, 'highlight');
282 return cards && cards.length > 0;
283 }
284}

Callers 1

deleteCommentMethod · 0.95

Calls 1

findCardsBySourceIdMethod · 0.45

Tested by

no test coverage detected