(configDir: string)
| 42 | } |
| 43 | |
| 44 | function findOmoConfig(configDir: string): string | null { |
| 45 | const locations = [ |
| 46 | join(configDir, "oh-my-openagent.jsonc"), |
| 47 | join(configDir, "oh-my-openagent.json"), |
| 48 | join(configDir, "oh-my-opencode.jsonc"), |
| 49 | join(configDir, "oh-my-opencode.json"), |
| 50 | ]; |
| 51 | for (const loc of locations) { |
| 52 | if (existsSync(loc)) return loc; |
| 53 | } |
| 54 | return null; |
| 55 | } |
| 56 | |
| 57 | export function detectConfigPaths(): ConfigPaths { |
| 58 | const configDir = getOpenCodeConfigDir(); |