UniqueProjectDirs returns the deduplicated set of project-scope skill directories from the Agents list, preserving insertion order.
()
| 392 | // UniqueProjectDirs returns the deduplicated set of project-scope skill |
| 393 | // directories from the Agents list, preserving insertion order. |
| 394 | func UniqueProjectDirs() []string { |
| 395 | seen := map[string]bool{} |
| 396 | var dirs []string |
| 397 | for _, h := range Agents { |
| 398 | if !seen[h.ProjectDir] { |
| 399 | seen[h.ProjectDir] = true |
| 400 | dirs = append(dirs, h.ProjectDir) |
| 401 | } |
| 402 | } |
| 403 | return dirs |
| 404 | } |
| 405 | |
| 406 | // InstallDir resolves the absolute installation directory for an agent host and scope. |
| 407 | // For project scope, it uses the provided git root directory so that skills are |
no outgoing calls