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

Function runtimeQueryGroups

src/api/TaskNotesAPI.ts:3318–3328  ·  view source on GitHub ↗
(
	groupedTasks: Map<string, TaskInfo[]>,
	returnedPaths: Set<string>
)

Source from the content-addressed store, hash-verified

3316}
3317
3318function runtimeQueryGroups(
3319 groupedTasks: Map<string, TaskInfo[]>,
3320 returnedPaths: Set<string>
3321): TaskNotesRuntimeQueryGroup[] {
3322 const groups: TaskNotesRuntimeQueryGroup[] = [];
3323 for (const [key, tasks] of groupedTasks.entries()) {
3324 const taskPaths = tasks.map((task) => task.path).filter((path) => returnedPaths.has(path));
3325 if (taskPaths.length > 0) groups.push({ key, label: key, taskPaths });
3326 }
3327 return groups;
3328}
3329
3330function runtimeNodeId(path: string): string {
3331 return `runtime:${path.replace(/[^a-z0-9._-]+/giu, "-")}`;

Callers 1

queryTasksMethod · 0.85

Calls 1

hasMethod · 0.80

Tested by

no test coverage detected