| 86 | } |
| 87 | |
| 88 | func countOpenclawConfiguredChannels(conf map[string]interface{}) int { |
| 89 | channels, ok := conf["channels"].(map[string]interface{}) |
| 90 | if !ok { |
| 91 | return 0 |
| 92 | } |
| 93 | count := 0 |
| 94 | for _, value := range channels { |
| 95 | channel, ok := value.(map[string]interface{}) |
| 96 | if !ok || len(channel) == 0 { |
| 97 | continue |
| 98 | } |
| 99 | count++ |
| 100 | } |
| 101 | return count |
| 102 | } |
| 103 | |
| 104 | func loadOpenclawOverviewSkillStats(containerName string) (int, error) { |
| 105 | output, err := cmd.RunDockerExecWithStdout(5*time.Minute, containerName, "openclaw", "skills", "list", "--json") |