mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 19:05:11 +00:00
fix(coding-agent): filter out conflicting extensions from loaded list
This commit is contained in:
parent
1faaccc5c7
commit
5c047c351d
1 changed files with 6 additions and 2 deletions
|
|
@ -283,8 +283,12 @@ export class DefaultResourceLoader implements ResourceLoader {
|
|||
|
||||
// Detect extension conflicts (tools, commands, flags with same names from different extensions)
|
||||
const conflicts = this.detectExtensionConflicts(extensionsResult.extensions);
|
||||
for (const conflict of conflicts) {
|
||||
extensionsResult.errors.push({ path: conflict.path, error: conflict.message });
|
||||
if (conflicts.length > 0) {
|
||||
const conflictingPaths = new Set(conflicts.map((c) => c.path));
|
||||
extensionsResult.extensions = extensionsResult.extensions.filter((ext) => !conflictingPaths.has(ext.path));
|
||||
for (const conflict of conflicts) {
|
||||
extensionsResult.errors.push({ path: conflict.path, error: conflict.message });
|
||||
}
|
||||
}
|
||||
|
||||
this.extensionsResult = this.extensionsOverride ? this.extensionsOverride(extensionsResult) : extensionsResult;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue