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

Method Info

cli/skill_handler.go:606–629  ·  view source on GitHub ↗

Info shows metadata about a skill, checking local installed first, then registries. If fromRegistry is non-empty, only that registry is queried for remote metadata. The function is a thin orchestrator — each row of the output (name, description, version, …) is rendered by a focused helper so the fun

(ctx context.Context, name string, fromRegistry string)

Source from the content-addressed store, hash-verified

604// helper so the function stays under the project's complexity budget and
605// each row can be exercised independently in tests.
606func (sh *SkillHandler) Info(ctx context.Context, name string, fromRegistry string) {
607 ctx, cancel := context.WithTimeout(ctx, 10*time.Second)
608 defer cancel()
609
610 local := sh.findBestLocalInfo(name)
611 remote := sh.resolveRemoteSkillMeta(ctx, name, fromRegistry)
612
613 if local == nil && remote == nil {
614 fmt.Printf("\n %s\n\n", i18n.T("skill.info.not_found", name))
615 return
616 }
617
618 fmt.Println()
619 sh.printSkillInfoHeader(name, local, remote)
620 sh.printSkillInfoDetails(local, remote)
621 sh.printSkillSourceLinks(remote)
622
623 if remote != nil && registry.IsSkillsShSource(remote.RegistryName) && remote.Slug != "" {
624 sh.showSecurityAudits(ctx, remote)
625 }
626 printSkillModeration(remote)
627 sh.printSkillInstallStatus(name)
628 fmt.Println()
629}
630
631// findBestLocalInfo returns the first local install record matching the
632// (base) name, or nil when nothing local exists.

Callers 1

HandleCommandMethod · 0.95

Calls 10

findBestLocalInfoMethod · 0.95
printSkillInfoHeaderMethod · 0.95
printSkillInfoDetailsMethod · 0.95
printSkillSourceLinksMethod · 0.95
showSecurityAuditsMethod · 0.95
TFunction · 0.92
IsSkillsShSourceFunction · 0.92
printSkillModerationFunction · 0.85

Tested by

no test coverage detected