Merge pull request #9483 from nicdumz/do-not-overwrite-settings

fix: merge yaml.schemas settings
This commit is contained in:
Dallin Romney 2026-01-14 13:27:36 -08:00 • committed by GitHub
commit cfab3937e2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -59,6 +59,7 @@ export async function activateExtension(context: vscode.ExtensionContext) {
// Register config.yaml schema by removing old entries and adding new one (uri.fsPath changes with each version)
const yamlMatcher = ".continue/**/*.yaml";
const yamlConfig = vscode.workspace.getConfiguration("yaml");
const yamlSchemas = yamlConfig.get<object>("schemas", {});
const newPath = vscode.Uri.joinPath(
context.extension.extensionUri,
@ -68,7 +69,10 @@ export async function activateExtension(context: vscode.ExtensionContext) {
try {
await yamlConfig.update(
"schemas",
{ [newPath]: [yamlMatcher] },
{
...yamlSchemas,
[newPath]: [yamlMatcher],
},
vscode.ConfigurationTarget.Global,
);
} catch (error) {