From a0729bd6ec7f5a7b8cdf187baac8abf3156b9f75 Mon Sep 17 00:00:00 2001 From: Nicolas Dumazet Date: Sun, 11 Jan 2026 16:23:57 +0100 Subject: [PATCH] fix: merge yaml.schemas settings Users may already have `yaml.schemas` preferences and the extension should not be overwriting user settings. The code is however free to control keys for `extensionUri`, as long as it leaves other entries alone. See also #7080 --- extensions/vscode/src/activation/activate.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/extensions/vscode/src/activation/activate.ts b/extensions/vscode/src/activation/activate.ts index 6f4275f67..45fc24d49 100644 --- a/extensions/vscode/src/activation/activate.ts +++ b/extensions/vscode/src/activation/activate.ts @@ -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("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) {