fix(setup): preserve unrelated Hermes YAML line formatting

Preserve unrelated long YAML scalars when editing an existing Hermes configuration.

Co-authored-by: Zayd <iam@zayd.wtf>
This commit is contained in:
zayd / cold
2026-10-11 16:07:44 +08:00
committed by GitHub
co-authored by Zayd
parent 857a1b7b04
commit 58e91e14bd
2 changed files with 25 additions and 1 deletions
@@ -1342,7 +1342,8 @@ const serializeHermesConfiguration = (
if (entry === undefined)
yamlDocument.deleteIn([serversKey, PRODUCT_IDENTITY.mcpServerKey]);
else yamlDocument.setIn([serversKey, PRODUCT_IDENTITY.mcpServerKey], entry);
return yamlDocument.toString();
// Editing REA must not reflow unrelated user prompts or other YAML scalars.
return yamlDocument.toString({ lineWidth: 0 });
};
/** Build the stdio entry shape expected by one client's configuration dialect. */