FilterTasks creates a subgraph with only the specified task IDs
(taskIDs map[string]bool)
| 178 | |
| 179 | // FilterTasks creates a subgraph with only the specified task IDs |
| 180 | func (g *Graph) FilterTasks(taskIDs map[string]bool) *Graph { |
| 181 | filtered := []*model.Task{} |
| 182 | for _, task := range g.Tasks { |
| 183 | if taskIDs[task.ID] { |
| 184 | filtered = append(filtered, task) |
| 185 | } |
| 186 | } |
| 187 | return NewGraph(filtered) |
| 188 | } |
| 189 | |
| 190 | // ToMermaid generates a Mermaid diagram |
| 191 | func (g *Graph) ToMermaid(focusTaskID string) string { |