Elffuss BraidHub

kikocis/continue public

fix multiple configs present
Changeset45dc5eda13d96c29247db4b8c190538da30f54348e45790b4a3cb79b07f23214
Authoruinstinct <61635505+uinstinct@users.noreply.github.com> · 2025-07-04 18:14 +05:30
Committeruinstinct <61635505+uinstinct@users.noreply.github.com> · 2025-07-04 18:14 +05:30
Parentsd26a03bcbf7f

Browse the files at this changeset

1 file changed

modified extensions/vscode/src/activation/activate.ts +3 −9
@@ -24,8 +24,8 @@
2424
2525 // Load Continue configuration
2626 if (!context.globalState.get("hasBeenInstalled")) {
27- context.globalState.update("hasBeenInstalled", true);
28- Telemetry.capture(
27+ void context.globalState.update("hasBeenInstalled", true);
28+ void Telemetry.capture(
2929 "install",
3030 {
3131 extensionVersion: getExtensionVersion(),
@@ -38,21 +38,15 @@
3838 const yamlMatcher = ".continue/**/*.yaml";
3939 const yamlConfig = vscode.workspace.getConfiguration("yaml");
4040
41- const existingSchemas = yamlConfig.get("schemas") || {};
42- const newSchemas = Object.entries(existingSchemas).filter(
43- ([_, value]) => Array.isArray(value) && value.includes(yamlMatcher), // remove old ones
44- );
45-
4641 const newPath = path.join(
4742 context.extension.extensionUri.fsPath,
4843 "config-yaml-schema.json",
4944 );
50- newSchemas.push([newPath, [yamlMatcher]]);
5145
5246 try {
5347 await yamlConfig.update(
5448 "schemas",
55- Object.fromEntries(newSchemas),
49+ { [newPath]: [yamlMatcher] },
5650 vscode.ConfigurationTarget.Global,
5751 );
5852 } catch (error) {