fix(cli): preserve user config on reinstall
Previously, the install command would delete the entire 'agents' object from the user's oh-my-opencode config before merging new install settings. This caused all user customizations to be lost on reinstall. Fixed by removing the 'delete existing.agents' line and relying on the existing deepMerge function to properly merge configs, preserving user customizations while updating only the fields specified by the installer. Fixes #556
This commit is contained in:
parent
13d3dc7144
commit
7853f1f4bf
@ -341,7 +341,6 @@ export function writeOmoConfig(installConfig: InstallConfig): ConfigMergeResult
|
||||
return { success: true, configPath: omoConfigPath }
|
||||
}
|
||||
|
||||
delete existing.agents
|
||||
const merged = deepMerge(existing, newConfig)
|
||||
writeFileSync(omoConfigPath, JSON.stringify(merged, null, 2) + "\n")
|
||||
} catch (parseErr) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user