(arcticConfig: Config.Info, opencodeConfig: Config.Info, fields: string[])
| 292 | } |
| 293 | |
| 294 | async function importConfig(arcticConfig: Config.Info, opencodeConfig: Config.Info, fields: string[]) { |
| 295 | const merged = mergeConfigs(arcticConfig, opencodeConfig, fields) |
| 296 | const Global = await import("../global").then((m) => m.Global) |
| 297 | const configPath = path.join(Global.Path.config, "arctic.json") |
| 298 | await Bun.write(configPath, JSON.stringify(merged, null, 2)) |
| 299 | log.info("imported opencode config", { fields }) |
| 300 | } |
| 301 | |
| 302 | export async function maybeImportOpenCodeConfig() { |
| 303 | if (!process.stdin.isTTY || !process.stdout.isTTY) { |
no test coverage detected