MCPcopy Create free account
hub / github.com/cli/cli / UniqueProjectDirs

Function UniqueProjectDirs

internal/skills/registry/registry.go:394–404  ·  view source on GitHub ↗

UniqueProjectDirs returns the deduplicated set of project-scope skill directories from the Agents list, preserving insertion order.

()

Source from the content-addressed store, hash-verified

392// UniqueProjectDirs returns the deduplicated set of project-scope skill
393// directories from the Agents list, preserving insertion order.
394func 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

Callers 2

checkInstalledSkillDirsFunction · 0.92
TestUniqueProjectDirsFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestUniqueProjectDirsFunction · 0.68