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

Function WriteConfig

internal/tools/configwriter.go:125–138  ·  view source on GitHub ↗

WriteConfig is Plan + Apply. Used by cli/launch.go.

(tool Tool, endpoint providers.Endpoint, endpointName, model, apiKey string)

Source from the content-addressed store, hash-verified

123
124// WriteConfig is Plan + Apply. Used by cli/launch.go.
125func WriteConfig(tool Tool, endpoint providers.Endpoint, endpointName, model, apiKey string) (string, error) {
126 plan, err := Plan(tool, endpoint, endpointName, model, apiKey)
127 if err != nil {
128 return "", err
129 }
130 path, err := Apply(tool, plan)
131 if err != nil {
132 return "", err
133 }
134 if err := codexPostWrite(tool, endpointName, model, path); err != nil {
135 return "", err
136 }
137 return path, nil
138}
139
140func containsArraySegment(parts []string) bool {
141 for _, p := range parts {

Calls 3

PlanFunction · 0.85
ApplyFunction · 0.85
codexPostWriteFunction · 0.85