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

Method ShowRegistries

cli/skill_handler.go:1073–1096  ·  view source on GitHub ↗

ShowRegistries displays all configured registries.

()

Source from the content-addressed store, hash-verified

1071
1072// ShowRegistries displays all configured registries.
1073func (sh *SkillHandler) ShowRegistries() {
1074 regs := sh.registryMgr.GetRegistries()
1075
1076 fmt.Printf("\n %s\n\n", colorize(i18n.T("skill.registries.configured")+":", ColorCyan))
1077
1078 for i, r := range regs {
1079 status := colorize("["+i18n.T("skill.cmd.status_enabled")+"]", ColorGreen)
1080 if r.TempDisabled {
1081 remaining := ""
1082 if r.DisabledUntil != nil {
1083 remaining = fmt.Sprintf(" ~%ds", int(time.Until(*r.DisabledUntil).Seconds()))
1084 }
1085 status = colorize(fmt.Sprintf("[%s]", i18n.T("skill.cmd.status_paused_failures", r.FailureCount, remaining)), ColorYellow)
1086 } else if !r.Enabled {
1087 status = colorize("["+i18n.T("skill.cmd.status_disabled")+"]", ColorGray)
1088 }
1089 fmt.Printf(" %d. %-12s %s %s\n", i+1, r.Name, colorize(r.URL, ColorGray), status)
1090 }
1091
1092 fmt.Printf("\n %s: %s\n", i18n.T("skill.registries.config"), colorize(sh.registryMgr.GetConfigPath(), ColorGray))
1093 fmt.Printf(" %s\n", i18n.T("skill.registries.toggle_hint",
1094 colorize("/skill registry enable|disable <name>", ColorCyan)))
1095 fmt.Println()
1096}
1097
1098// SetRegistryEnabled enables or disables a registry by name, persists the change,
1099// and hot-reloads the registry manager so the change takes effect immediately.

Callers 1

HandleCommandMethod · 0.95

Calls 4

TFunction · 0.92
colorizeFunction · 0.85
GetRegistriesMethod · 0.80
GetConfigPathMethod · 0.80

Tested by

no test coverage detected