MCPcopy Create free account
hub / github.com/Chat2AnyLLM/code-agent-manager / printEndpointTable

Function printEndpointTable

internal/cli/global.go:70–92  ·  view source on GitHub ↗
(out interface{ Write(p []byte) (int, error) }, file providers.File)

Source from the content-addressed store, hash-verified

68}
69
70func printEndpointTable(out interface{ Write(p []byte) (int, error) }, file providers.File) {
71 fmt.Fprintf(out, "Endpoints: %d\n", len(file.Endpoints))
72 for _, name := range file.SortedNames() {
73 ep := file.Endpoints[name]
74 fmt.Fprintf(out, "- %s\n", name)
75 fmt.Fprintf(out, " URL: %s\n", ep.Endpoint)
76 if ep.SupportedClient != "" {
77 clients := ep.Clients()
78 sort.Strings(clients)
79 fmt.Fprintf(out, " Clients: %s\n", joinComma(clients))
80 }
81 if ep.APIKeyEnv != "" {
82 status := "missing"
83 if os.Getenv(ep.APIKeyEnv) != "" {
84 status = "set"
85 }
86 fmt.Fprintf(out, " API key: %s (%s)\n", ep.APIKeyEnv, status)
87 }
88 if len(ep.Models) > 0 {
89 fmt.Fprintf(out, " Models: %s\n", joinComma(ep.Models))
90 }
91 }
92}
93
94func joinComma(items []string) string {
95 out := ""

Callers 1

Calls 3

joinCommaFunction · 0.85
SortedNamesMethod · 0.80
ClientsMethod · 0.80

Tested by

no test coverage detected