mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-16 04:01:56 +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
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue