From ed7bb0a8e5c70165a1d6fe25a8f574cd9f0be709 Mon Sep 17 00:00:00 2001 From: Nate Date: Wed, 30 Jul 2025 13:45:22 -0700 Subject: [PATCH] fix: address feedback --- src/util/yamlConfigUpdater.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/util/yamlConfigUpdater.ts b/src/util/yamlConfigUpdater.ts index da6799dde..059bdf8f7 100644 --- a/src/util/yamlConfigUpdater.ts +++ b/src/util/yamlConfigUpdater.ts @@ -65,13 +65,8 @@ export function updateAnthropicModelInYaml(yamlContent: string, apiKey: string): // Add the new anthropic model config.models.push(newModel); - // Preserve comments by manually reconstructing the document - // Get all the top-level comments and structure - if (doc.has('models')) { - doc.set('models', config.models); - } else { - doc.set('models', config.models); - } + // Update the models array while preserving comments and structure + doc.set('models', config.models); return doc.toString(); } catch (error) {