| 3316 | } |
| 3317 | |
| 3318 | function 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 | |
| 3330 | function runtimeNodeId(path: string): string { |
| 3331 | return `runtime:${path.replace(/[^a-z0-9._-]+/giu, "-")}`; |