Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

🐛 fix: slove the execAgents tools exec types not correct (#13807)

LiJian116495bd1e1d
diff --git a/packages/context-engine/src/engine/tools/ToolResolver.ts b/packages/context-engine/src/engine/tools/ToolResolver.ts
index c29d829da23..3643097af71 100644
--- a/packages/context-engine/src/engine/tools/ToolResolver.ts
+++ b/packages/context-engine/src/engine/tools/ToolResolver.ts
@@ -101,7 +101,10 @@ export class ToolResolver {
tools.push(...newTools);
enabledToolIds.push(activation.id);
- if (activation.source) {
+ // Only set source if not already present — the operation-level sourceMap
+ // may already have the correct routing source (e.g., 'lobehubSkill', 'klavis')
+ // and the activation source ('discovery') should not overwrite it.
+ if (activation.source && !sourceMap[activation.id]) {
sourceMap[activation.id] = this.mapSource(activation.source);
}
}