minor change

This commit is contained in:
Jicheng Lu 2025-05-27 15:26:11 -05:00
parent 28d4f4e9ba
commit 59eb471dee
2 changed files with 1 additions and 8 deletions

View file

@ -66,13 +66,7 @@ public class BasicAgentHook : AgentHookBase
var innerUtilities = utilities!.Where(x =>
{
var isVisible = !string.IsNullOrEmpty(x.Name) && !x.Disabled;
if (!isVisible)
{
return isVisible;
}
isVisible = agentService.RenderUtility(agent, x);
return isVisible;
return isVisible && agentService.RenderUtility(agent, x);
}).ToList();
var functionNames = innerUtilities.SelectMany(x => x.Functions)

View file

@ -1,6 +1,5 @@
using BotSharp.Abstraction.Loggers;
using BotSharp.Abstraction.Templating;
using Microsoft.EntityFrameworkCore;
using Newtonsoft.Json.Linq;
namespace BotSharp.Core.Agents.Services;