fix: unable to use agent in agent (#16910)

### Summary

As title

#### Agent:
<img width="3707" height="2030" alt="image"
src="https://github.com/user-attachments/assets/68480004-9c79-4302-ae22-eb3375b7fac9"
/>

#### Data_operations
<img width="3716" height="2044" alt="image"
src="https://github.com/user-attachments/assets/068cc1a6-1ba5-4746-a447-a706d2149ef5"
/>
This commit is contained in:
Haruko386
2026-07-15 10:58:59 +08:00
committed by GitHub
parent 215d291cfa
commit a19af34d31
4 changed files with 200 additions and 1 deletions

View File

@@ -217,7 +217,9 @@ func (h *AgentHandler) DebugComponent(c *gin.Context) {
}
invokeCtx := runtime.WithState(c.Request.Context(), debugState)
outputs, err := comp.Invoke(invokeCtx, inputs)
outputs, err := runtime.TrackElapsed(name, func() (map[string]any, error) {
return comp.Invoke(invokeCtx, inputs)
})
if err != nil {
common.ResponseWithCodeData(c, common.CodeServerError, nil, "invoke: "+err.Error())
return