From 89076bab9284a1d8b30700aa55130b02350e7082 Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Tue, 10 Mar 2026 08:48:25 +0000 Subject: [PATCH] fix(ui): wrap struct to pass metadata fields Signed-off-by: Ettore Di Giacinto --- core/http/endpoints/localai/agents.go | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/core/http/endpoints/localai/agents.go b/core/http/endpoints/localai/agents.go index 2c29229aa..5226f7edf 100644 --- a/core/http/endpoints/localai/agents.go +++ b/core/http/endpoints/localai/agents.go @@ -225,18 +225,17 @@ func AgentSSEEndpoint(app *application.Application) echo.HandlerFunc { } } +type agentConfigMetaResponse struct { + state.AgentConfigMeta + OutputsDir string `json:"OutputsDir"` +} + func GetAgentConfigMetaEndpoint(app *application.Application) echo.HandlerFunc { return func(c echo.Context) error { svc := app.AgentPoolService() - meta := svc.GetConfigMeta() - return c.JSON(http.StatusOK, map[string]any{ - "filters": meta.Filters, - "fields": meta.Fields, - "connectors": meta.Connectors, - "actions": meta.Actions, - "dynamicPrompts": meta.DynamicPrompts, - "mcpServers": meta.MCPServers, - "outputsDir": svc.OutputsDir(), + return c.JSON(http.StatusOK, agentConfigMetaResponse{ + AgentConfigMeta: svc.GetConfigMeta(), + OutputsDir: svc.OutputsDir(), }) } }