From b9369d3c895c7056264597302a35765843fe1e85 Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Thu, 12 Mar 2026 01:07:43 +0900 Subject: [PATCH] fix(config): preserve disabled arrays during partial parsing Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus --- src/plugin-config.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/plugin-config.ts b/src/plugin-config.ts index fa22c5b3c..e1d8afb0d 100644 --- a/src/plugin-config.ts +++ b/src/plugin-config.ts @@ -11,6 +11,15 @@ import { migrateConfigFile, } from "./shared"; +const PARTIAL_STRING_ARRAY_KEYS = new Set([ + "disabled_mcps", + "disabled_agents", + "disabled_skills", + "disabled_hooks", + "disabled_commands", + "disabled_tools", +]); + export function parseConfigPartially( rawConfig: Record ): OhMyOpenCodeConfig | null { @@ -23,6 +32,14 @@ export function parseConfigPartially( const invalidSections: string[] = []; for (const key of Object.keys(rawConfig)) { + if (PARTIAL_STRING_ARRAY_KEYS.has(key)) { + const sectionValue = rawConfig[key]; + if (Array.isArray(sectionValue) && sectionValue.every((value) => typeof value === "string")) { + partialConfig[key] = sectionValue; + } + continue; + } + const sectionResult = OhMyOpenCodeConfigSchema.safeParse({ [key]: rawConfig[key] }); if (sectionResult.success) { const parsed = sectionResult.data as Record;