MCPcopy Index your code
hub / github.com/cli/cli / DisplayName

Method DisplayName

internal/skills/discovery/discovery.go:59–74  ·  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

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