MCPcopy Index your code
hub / github.com/callumalpass/tasknotes / taskHasDetails

Function taskHasDetails

src/ui/taskCardState.ts:52–67  ·  view source on GitHub ↗
(task: TaskInfo, plugin?: TaskNotesPlugin)

Source from the content-addressed store, hash-verified

50}
51
52export function taskHasDetails(task: TaskInfo, plugin?: TaskNotesPlugin): boolean {
53 if (typeof task.details === "string") {
54 return task.details.trim().length > 0;
55 }
56
57 if (!plugin || !task.path) {
58 return false;
59 }
60
61 const sections = plugin.app.metadataCache.getCache?.(task.path)?.sections;
62 if (!sections) {
63 return false;
64 }
65
66 return sections.some((section) => section.type !== "yaml");
67}
68
69export function shouldStrikeThroughCompletedTasks(plugin: TaskNotesPlugin): boolean {
70 return plugin.settings?.showCompletedTaskStrikethrough !== false;

Callers 3

buildTaskCardRenderStateFunction · 0.85

Calls 1

getCacheMethod · 0.80

Tested by

no test coverage detected