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
()
| 57 | // a convention tag to distinguish them from identically-named skills in |
| 58 | // the standard skills/ directory. |
| 59 | func (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), |