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

* fix: slove the execAgents tools exec types not correct

* fix: should inject source:discovery when tools type is lost

* fix: delete the source inject test
This commit is contained in:
LiJian 2026-04-14 17:51:08 +08:00 committed by GitHub
parent 922f7ace41
commit 116495bd1e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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);
}
}