Changesets · Branches · Tags · Compare
| Changeset | 45dc5eda13d96c29247db4b8c190538da30f54348e45790b4a3cb79b07f23214 |
|---|---|
| Author | uinstinct <61635505+uinstinct@users.noreply.github.com> · 2025-07-04 18:14 +05:30 |
| Committer | uinstinct <61635505+uinstinct@users.noreply.github.com> · 2025-07-04 18:14 +05:30 |
| Parents | d26a03bcbf7f |
1 file changed
modified extensions/vscode/src/activation/activate.ts +3 −9
| @@ -24,8 +24,8 @@ | ||
| 24 | 24 | |
| 25 | 25 | // Load Continue configuration |
| 26 | 26 | 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( | |
| 29 | 29 | "install", |
| 30 | 30 | { |
| 31 | 31 | extensionVersion: getExtensionVersion(), |
| @@ -38,21 +38,15 @@ | ||
| 38 | 38 | const yamlMatcher = ".continue/**/*.yaml"; |
| 39 | 39 | const yamlConfig = vscode.workspace.getConfiguration("yaml"); |
| 40 | 40 | |
| 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 | - | |
| 46 | 41 | const newPath = path.join( |
| 47 | 42 | context.extension.extensionUri.fsPath, |
| 48 | 43 | "config-yaml-schema.json", |
| 49 | 44 | ); |
| 50 | - newSchemas.push([newPath, [yamlMatcher]]); | |
| 51 | 45 | |
| 52 | 46 | try { |
| 53 | 47 | await yamlConfig.update( |
| 54 | 48 | "schemas", |
| 55 | - Object.fromEntries(newSchemas), | |
| 49 | + { [newPath]: [yamlMatcher] }, | |
| 56 | 50 | vscode.ConfigurationTarget.Global, |
| 57 | 51 | ); |
| 58 | 52 | } catch (error) { |