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)
| 698 | // printSkillInfoDetails prints the description/version/author/source/tags/ |
| 699 | // downloads rows. Each row is its own helper so the dispatcher stays linear. |
| 700 | func (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 |
no test coverage detected