package service import ( "context" "git.x2erp.com/qdy/go-base/ctx" "git.x2erp.com/qdy/go-base/logger" "git.x2erp.com/qdy/go-base/model/response" "git.x2erp.com/qdy/go-base/util" "git.x2erp.com/qdy/go-svc-code/internal/model" ) // AgentItem 智能体项结构 type AgentItem struct { ID string `json:"id"` // 智能体ID Name string `json:"name"` // 智能体名称(标题) } // GetAgents 获取智能体列表 func GetAgents(ctx context.Context, reqCtx *ctx.RequestContext) *response.QueryResult[[]AgentItem] { logger.Debug("GetAgents-开始获取智能体列表") // 按固定顺序构建智能体列表 agents := []AgentItem{ { ID: model.AgentReplenish, Name: model.AgentDisplayName[model.AgentReplenish], }, { ID: model.AgentTransfer, Name: model.AgentDisplayName[model.AgentTransfer], }, { ID: model.AgentAllocation, Name: model.AgentDisplayName[model.AgentAllocation], }, { ID: model.AgentReport, Name: model.AgentDisplayName[model.AgentReport], }, } logger.Debug("返回智能体列表结构") return util.CreateSuccessResultData(agents, reqCtx) }