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

Method DisplayName

internal/skills/discovery/discovery.go:60–75  ·  view source on GitHub ↗

DisplayName returns the skill name, prefixed with namespace if present to disambiguate skills from different authors in the same repository. Skills discovered via non-standard conventions (plugins, root) include a convention tag to distinguish them from identically-named skills in the standard skill

()

Source from the content-addressed store, hash-verified

58// a convention tag to distinguish them from identically-named skills in
59// the standard skills/ directory.
60func (s Skill) DisplayName() string {
61 name := s.Name
62 if s.Namespace != "" {
63 name = s.Namespace + "/" + name
64 }
65 switch s.Convention {
66 case "plugins":
67 return "[plugins] " + name
68 case "root":
69 return "[root] " + name
70 case "hidden-dir", "hidden-dir-namespaced":
71 return "[hidden-dir] " + name
72 default:
73 return name
74 }
75}
76
77// InstallName returns the relative path used for the install directory.
78// For namespaced skills it returns "namespace/name" (creating a nested directory),

Callers 1

previewRunFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected