feat: refactor tool metadata handling and simplify allowed tool code checks

This commit is contained in:
mlogclub
2026-04-12 23:15:27 +08:00
parent c5941e91e0
commit 6499126f40
3 changed files with 38 additions and 29 deletions
@@ -108,12 +108,12 @@ func (f *AgentFactory) BuildCustomerServiceAgent(ctx context.Context, input Buil
if modelName == "" || toolCode == "" {
continue
}
serverCode, toolName, _ := toolx.GetRegisteredToolIdentity(toolCode)
serverCode, toolName, sourceType, _ := toolx.BuildToolMetadata(toolCode)
toolMetadataBy[modelName] = einocallbacks.ToolMetadata{
ToolCode: toolCode,
ServerCode: serverCode,
ToolName: toolName,
SourceType: toolx.ResolveToolSourceType(toolCode),
SourceType: sourceType,
}
}
if input.SelectedSkill != nil {