fix(coding-agent): empty array in package filter now disables all resources

fixes #1044
This commit is contained in:
Mario Zechner 2026-01-29 00:12:42 +01:00
parent 8b5c81f21f
commit d21cbde87f
2 changed files with 8 additions and 4 deletions

View file

@ -2,6 +2,10 @@
## [Unreleased]
### Fixed
- Empty array in package filter now disables all resources instead of falling back to manifest defaults ([#1044](https://github.com/badlogic/pi-mono/issues/1044))
## [0.50.1] - 2026-01-26
### Fixed

View file

@ -1155,17 +1155,17 @@ export class DefaultPackageManager implements PackageManager {
target: Map<string, { metadata: PathMetadata; enabled: boolean }>,
metadata: PathMetadata,
): void {
const { allFiles, enabledByManifest } = this.collectManifestFiles(packageRoot, resourceType);
const { allFiles } = this.collectManifestFiles(packageRoot, resourceType);
if (userPatterns.length === 0) {
// No user patterns, just use manifest filtering
// Empty array explicitly disables all resources of this type
for (const f of allFiles) {
this.addResource(target, f, metadata, enabledByManifest.has(f));
this.addResource(target, f, metadata, false);
}
return;
}
// Apply user patterns on top of manifest-enabled files
// Apply user patterns
const enabledByUser = applyPatterns(allFiles, userPatterns, packageRoot);
for (const f of allFiles) {