mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-20 15:01:24 +00:00
fix(coding-agent): empty array in package filter now disables all resources
fixes #1044
This commit is contained in:
parent
8b5c81f21f
commit
d21cbde87f
2 changed files with 8 additions and 4 deletions
|
|
@ -2,6 +2,10 @@
|
||||||
|
|
||||||
## [Unreleased]
|
## [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
|
## [0.50.1] - 2026-01-26
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
|
||||||
|
|
@ -1155,17 +1155,17 @@ export class DefaultPackageManager implements PackageManager {
|
||||||
target: Map<string, { metadata: PathMetadata; enabled: boolean }>,
|
target: Map<string, { metadata: PathMetadata; enabled: boolean }>,
|
||||||
metadata: PathMetadata,
|
metadata: PathMetadata,
|
||||||
): void {
|
): void {
|
||||||
const { allFiles, enabledByManifest } = this.collectManifestFiles(packageRoot, resourceType);
|
const { allFiles } = this.collectManifestFiles(packageRoot, resourceType);
|
||||||
|
|
||||||
if (userPatterns.length === 0) {
|
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) {
|
for (const f of allFiles) {
|
||||||
this.addResource(target, f, metadata, enabledByManifest.has(f));
|
this.addResource(target, f, metadata, false);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Apply user patterns on top of manifest-enabled files
|
// Apply user patterns
|
||||||
const enabledByUser = applyPatterns(allFiles, userPatterns, packageRoot);
|
const enabledByUser = applyPatterns(allFiles, userPatterns, packageRoot);
|
||||||
|
|
||||||
for (const f of allFiles) {
|
for (const f of allFiles) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue