fix: prevent OpenCode defaults from overwriting user agent config in oh-my-opencode.json
Fixes #472 When user sets agents.explore.model in oh-my-opencode.json, the config was being ignored because OpenCode's built-in explore agent overwrote it. Filter out agents that oh-my-opencode provides from OpenCode's config to ensure user config takes precedence.
This commit is contained in:
parent
66fd761a69
commit
c70ca39661
@ -260,6 +260,10 @@ export function createConfigHandler(deps: ConfigHandlerDeps) {
|
||||
.filter(([key]) => {
|
||||
if (key === "build") return false;
|
||||
if (key === "plan" && replacePlan) return false;
|
||||
// Filter out agents that oh-my-opencode provides to prevent
|
||||
// OpenCode defaults from overwriting user config in oh-my-opencode.json
|
||||
// See: https://github.com/code-yeongyu/oh-my-opencode/issues/472
|
||||
if (key in builtinAgents) return false;
|
||||
return true;
|
||||
})
|
||||
.map(([key, value]) => [
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user