MCPcopy Index your code
hub / github.com/anomalyco/opencode / globalConfigFile

Function globalConfigFile

packages/opencode/src/config/config.ts:139–147  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

137export const use = serviceUse(Service)
138
139function globalConfigFile() {
140 const candidates = ["opencode.jsonc", "opencode.json", "config.json"].map((file) =>
141 path.join(Global.Path.config, file),
142 )
143 for (const file of candidates) {
144 if (existsSync(file)) return file
145 }
146 return candidates[0]
147}
148
149function patchJsonc(input: string, patch: unknown, path: string[] = []): string {
150 if (!isRecord(patch)) {

Callers 1

config.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected