fix: address feedback

This commit is contained in:
Nate 2025-07-30 13:45:22 -07:00
parent fe16776d51
commit ed7bb0a8e5

View file

@ -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) {