mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 19:05:11 +00:00
fix(coding-agent): respect package.json pi.extensions manifest in settings extensions paths
collectAutoExtensionEntries now checks if the directory itself has a package.json with pi.extensions (or index.ts) before scanning children. This fixes duplicate extension loading when a manifest-aware directory is specified directly in settings.json extensions array. Fixes #1274
This commit is contained in:
parent
d27df1afa4
commit
5f5cd080b9
3 changed files with 45 additions and 0 deletions
|
|
@ -402,6 +402,13 @@ function collectAutoExtensionEntries(dir: string): string[] {
|
|||
const entries: string[] = [];
|
||||
if (!existsSync(dir)) return entries;
|
||||
|
||||
// First check if this directory itself has explicit extension entries (package.json or index)
|
||||
const rootEntries = resolveExtensionEntries(dir);
|
||||
if (rootEntries) {
|
||||
return rootEntries;
|
||||
}
|
||||
|
||||
// Otherwise, discover extensions from directory contents
|
||||
const ig = ignore();
|
||||
addIgnoreRules(ig, dir, dir);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue