MCPcopy Create free account
hub / github.com/cli/cli / selectedAgentHosts

Function selectedAgentHosts

pkg/cmd/skills/list/list.go:266–280  ·  view source on GitHub ↗
(agentID string)

Source from the content-addressed store, hash-verified

264}
265
266func selectedAgentHosts(agentID string) ([]*registry.AgentHost, error) {
267 if agentID != "" {
268 host, err := registry.FindByID(agentID)
269 if err != nil {
270 return nil, err
271 }
272 return []*registry.AgentHost{host}, nil
273 }
274
275 agentHosts := make([]*registry.AgentHost, len(registry.Agents))
276 for i := range registry.Agents {
277 agentHosts[i] = &registry.Agents[i]
278 }
279 return agentHosts, nil
280}
281
282func selectedScopes(scope string) []registry.Scope {
283 if scope != "" {

Callers 1

buildScanTargetsFunction · 0.85

Calls 1

FindByIDFunction · 0.92

Tested by

no test coverage detected