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

Function DefaultRegistry

internal/editorconfig/editor.go:151–167  ·  view source on GitHub ↗

DefaultRegistry builds a Registry containing every supported editor.

()

Source from the content-addressed store, hash-verified

149
150// DefaultRegistry builds a Registry containing every supported editor.
151func DefaultRegistry() *Registry {
152 r := &Registry{tools: map[string]ToolConfig{}}
153 for _, s := range defaultSpecs {
154 var tool ToolConfig
155 switch s.format {
156 case FormatJSON:
157 tool = newJSONToolConfig(s)
158 case FormatTOML:
159 tool = newTOMLToolConfig(s)
160 default:
161 panic(fmt.Sprintf("editorconfig: unsupported format %q", s.format))
162 }
163 r.tools[s.name] = tool
164 r.order = append(r.order, s.name)
165 }
166 return r
167}
168
169// Get returns the ToolConfig for name, or false when unknown.
170func (r *Registry) Get(name string) (ToolConfig, bool) {

Calls 2

newJSONToolConfigFunction · 0.85
newTOMLToolConfigFunction · 0.85