Changesets · Branches · Tags · Compare
| Changeset | abc6d87d99a5c6f43561a4ce4e9ca052e4205582dd7091011de59d8879a698ae |
|---|---|
| Author | Nate Sesti <33237525+sestinj@users.noreply.github.com> · 2025-07-04 17:44 -07:00 |
| Committer | GitHub <noreply@github.com> · 2025-07-04 17:44 -07:00 |
| Parents | 9900332e620f, 45dc5eda13d9 |
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) { |