MCPcopy Create free account
hub / github.com/diillson/chatcli / printSkillInfoDetails

Method printSkillInfoDetails

cli/skill_handler.go:700–727  ·  view source on GitHub ↗

printSkillInfoDetails prints the description/version/author/source/tags/ downloads rows. Each row is its own helper so the dispatcher stays linear.

(local *registry.InstalledSkillInfo, remote *registry.SkillMeta)

Source from the content-addressed store, hash-verified

698// printSkillInfoDetails prints the description/version/author/source/tags/
699// downloads rows. Each row is its own helper so the dispatcher stays linear.
700func (sh *SkillHandler) printSkillInfoDetails(local *registry.InstalledSkillInfo, remote *registry.SkillMeta) {
701 printInfoRow("skill.info.desc",
702 pickFirstNonEmpty(remoteDescription(remote), localDescription(local)),
703 ColorCyan)
704 printInfoRow("skill.info.version",
705 pickFirstNonEmpty(remoteVersion(remote), localVersion(local)),
706 ColorCyan)
707 if remote != nil {
708 printInfoRow("skill.info.author", remote.Author, ColorCyan)
709 }
710 printInfoRow("skill.info.source",
711 pickFirstNonEmpty(remoteRegistryName(remote), localSource(local)),
712 ColorCyan)
713 if remote != nil && len(remote.Tags) > 0 {
714 fmt.Printf(" %s %s\n",
715 colorize(i18n.T("skill.info.tags")+":", ColorCyan),
716 colorize(strings.Join(remote.Tags, ", "), ColorGray))
717 }
718 if remote != nil && remote.Downloads > 0 {
719 label := i18n.T("skill.info.downloads")
720 if registry.IsSkillsShSource(remote.RegistryName) {
721 label = i18n.T("skill.info.installs")
722 }
723 fmt.Printf(" %s %s\n",
724 colorize(label+":", ColorCyan),
725 registry.FormatInstallCount(remote.Downloads))
726 }
727}
728
729// printSkillSourceLinks renders the GitHub source repo URL and the
730// skills.sh detail page URL when the remote meta carries a slug from the

Callers 1

InfoMethod · 0.95

Calls 12

TFunction · 0.92
IsSkillsShSourceFunction · 0.92
FormatInstallCountFunction · 0.92
printInfoRowFunction · 0.85
pickFirstNonEmptyFunction · 0.85
remoteDescriptionFunction · 0.85
localDescriptionFunction · 0.85
remoteVersionFunction · 0.85
localVersionFunction · 0.85
remoteRegistryNameFunction · 0.85
localSourceFunction · 0.85
colorizeFunction · 0.85

Tested by

no test coverage detected