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

Method PathFor

internal/editorconfig/yaml_tool.go:38–54  ·  view source on GitHub ↗
(scope Scope)

Source from the content-addressed store, hash-verified

36}
37
38func (c *yamlToolConfig) PathFor(scope Scope) string {
39 switch scope {
40 case UserScope:
41 paths := c.UserPaths()
42 for _, p := range paths {
43 if pathutil.Exists(p) {
44 return p
45 }
46 }
47 if len(paths) > 0 {
48 return paths[0]
49 }
50 case ProjectScope:
51 return c.ProjectPath()
52 }
53 return ""
54}
55
56func (c *yamlToolConfig) Load(scope Scope) (map[string]any, string, error) {
57 path := c.PathFor(scope)

Callers 4

LoadMethod · 0.95
LoadAllMethod · 0.95
SetMethod · 0.95
UnsetMethod · 0.95

Calls 3

UserPathsMethod · 0.95
ProjectPathMethod · 0.95
ExistsFunction · 0.92

Tested by

no test coverage detected