fix(config): preserve formatter config from opencode settings
Closes #2117
This commit is contained in:
@@ -20,6 +20,8 @@ export function createConfigHandler(deps: ConfigHandlerDeps) {
|
||||
const { ctx, pluginConfig, modelCacheState } = deps;
|
||||
|
||||
return async (config: Record<string, unknown>) => {
|
||||
const formatterConfig = config.formatter;
|
||||
|
||||
applyProviderConfig({ config, modelCacheState });
|
||||
|
||||
const pluginComponents = await loadPluginComponents({ pluginConfig });
|
||||
@@ -35,6 +37,8 @@ export function createConfigHandler(deps: ConfigHandlerDeps) {
|
||||
await applyMcpConfig({ config, pluginConfig, pluginComponents });
|
||||
await applyCommandConfig({ config, pluginConfig, ctx, pluginComponents });
|
||||
|
||||
config.formatter = formatterConfig;
|
||||
|
||||
log("[config-handler] config handler applied", {
|
||||
agentCount: Object.keys(agentResult).length,
|
||||
commandCount: Object.keys((config.command as Record<string, unknown>) ?? {})
|
||||
|
||||
Reference in New Issue
Block a user