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

Function normalizeExtensions

internal/cli/extension.go:109–131  ·  view source on GitHub ↗
(payload any)

Source from the content-addressed store, hash-verified

107}
108
109func normalizeExtensions(payload any) []map[string]any {
110 switch v := payload.(type) {
111 case []any:
112 out := make([]map[string]any, 0, len(v))
113 for _, item := range v {
114 if m, ok := item.(map[string]any); ok {
115 out = append(out, m)
116 }
117 }
118 return out
119 case map[string]any:
120 if exts, ok := v["extensions"].([]any); ok {
121 out := make([]map[string]any, 0, len(exts))
122 for _, item := range exts {
123 if m, ok := item.(map[string]any); ok {
124 out = append(out, m)
125 }
126 }
127 return out
128 }
129 }
130 return nil
131}
132
133func passthroughGemini(args []string) error {
134 bin, err := exec.LookPath("gemini")

Callers 1

extensionBrowseCommandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected