MCPcopy Create free account
hub / github.com/driangle/taskmd / FilterTasks

Method FilterTasks

sdk/go/graph/graph.go:180–188  ·  view source on GitHub ↗

FilterTasks creates a subgraph with only the specified task IDs

(taskIDs map[string]bool)

Source from the content-addressed store, hash-verified

178
179// FilterTasks creates a subgraph with only the specified task IDs
180func (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
191func (g *Graph) ToMermaid(focusTaskID string) string {

Callers 3

runGraphFunction · 0.95
handleGraphFunction · 0.95
TestFilterTasksFunction · 0.95

Calls 1

NewGraphFunction · 0.85

Tested by 1

TestFilterTasksFunction · 0.76