MCPcopy
hub / github.com/callumalpass/tasknotes / pathsToTaskInfos

Method pathsToTaskInfos

src/services/FilterService.ts:317–335  ·  view source on GitHub ↗

* Convert task paths to TaskInfo objects

(paths: string[])

Source from the content-addressed store, hash-verified

315 * Convert task paths to TaskInfo objects
316 */
317 private async pathsToTaskInfos(paths: string[]): Promise<TaskInfo[]> {
318 const tasks: TaskInfo[] = [];
319 const batchSize = 50;
320
321 for (let i = 0; i < paths.length; i += batchSize) {
322 const batch = paths.slice(i, i + batchSize);
323 const batchTasks = await Promise.all(
324 batch.map((path) => this.cacheManager.getCachedTaskInfo(path))
325 );
326
327 for (const task of batchTasks) {
328 if (task) {
329 tasks.push(task);
330 }
331 }
332 }
333
334 return tasks;
335 }
336
337 /**
338 * Recursively evaluate a filter node (group or condition) against a task

Callers 4

getGroupedTasksMethod · 0.95
getTasksForDateMethod · 0.95
getOverdueTasksMethod · 0.95

Calls 2

allMethod · 0.80
getCachedTaskInfoMethod · 0.45

Tested by

no test coverage detected