refactor: DateTimeTool 注入为单例依赖

为 DateTimeTool 实现 ISingletonDependency,统一生命周期管理,便于依赖注入使用
This commit is contained in:
ccnetcore
2026-01-08 22:24:56 +08:00
parent 6665d2fb2e
commit 5489f33d54

View File

@@ -1,10 +1,11 @@
using System.ComponentModel;
using Volo.Abp.DependencyInjection;
using Yi.Framework.AiHub.Domain.Shared.Attributes;
namespace Yi.Framework.AiHub.Domain.Mcp;
[YiAgentTool]
public class DateTimeTool
public class DateTimeTool:ISingletonDependency
{
[YiAgentTool("时间"), DisplayName("DateTime"), Description("获取当前日期与时间")]
public DateTime DateTime()