MCPcopy Index your code
hub / github.com/cli/cli / selectedAgentHosts

Function selectedAgentHosts

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

Source from the content-addressed store, hash-verified

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

Callers 1

buildScanTargetsFunction · 0.85

Calls 1

FindByIDFunction · 0.92

Tested by

no test coverage detected