-
Notifications
You must be signed in to change notification settings - Fork 942
feat(config) - add option to remove "specific" aspect config #9488
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds functionality to allow removing "specific" aspect configurations by introducing a new special sign -- that can be used to ignore extensions from specific configuration sources (BitmapFile, ModelSpecific, ComponentJsonFile).
- Introduces a new
IGNORE_FROM_SPECIFIC_SPECIAL_SIGNconstant (--) alongside the existing remove sign (-) - Updates the aspects merger to filter out extensions marked with the ignore sign from specific configuration sources
- Adds type safety improvements for config object handling
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| scopes/workspace/workspace/aspects-merger.ts | Implements the core logic to filter ignored extensions from specific sources and adds type safety for config objects |
| components/legacy/extension-data/index.ts | Exports the new ignore constant |
| components/legacy/extension-data/extension-data.ts | Defines the new ignore special sign and related types/methods |
| components/legacy/extension-data/extension-data-list.ts | Adds filtering method for ignored extensions |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| ignoredFromSpecificsExtensionIds.push( | ||
| ...extensions.filter((extData) => extData.isIgnoredFromSpecific).map((extData) => extData.stringId) | ||
| ); | ||
| extsWithoutIgnored = extensions.filter((ext) => !ignoredFromSpecificsExtensionIds.includes(ext.stringId)); |
Copilot
AI
Sep 29, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using includes() with an array for filtering can be inefficient for large datasets. Consider using a Set for ignoredFromSpecificsExtensionIds to improve lookup performance from O(n) to O(1).
| get config(): { [key: string]: any } | string { | ||
| if (this.rawConfig === REMOVE_EXTENSION_SPECIAL_SIGN) return {}; | ||
| return this.rawConfig; |
Copilot
AI
Sep 29, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The return type change from { [key: string]: any } to { [key: string]: any } | string is a breaking change that could affect consumers expecting only object types. Consider maintaining backward compatibility or documenting this breaking change.
| get config(): { [key: string]: any } | string { | |
| if (this.rawConfig === REMOVE_EXTENSION_SPECIAL_SIGN) return {}; | |
| return this.rawConfig; | |
| get config(): { [key: string]: any } { | |
| if ( | |
| this.rawConfig === REMOVE_EXTENSION_SPECIAL_SIGN || | |
| this.rawConfig === IGNORE_FROM_SPECIFIC_SPECIAL_SIGN | |
| ) { | |
| return {}; | |
| } | |
| return this.rawConfig as { [key: string]: any }; |
Proposed Changes