refactor: unify action execution interface and merge AI action handling

This commit is contained in:
lilong.129
2025-06-07 23:59:07 +08:00
parent fcf3009c67
commit ec4f1eb68a
8 changed files with 199 additions and 65 deletions

View File

@@ -19,7 +19,7 @@ func (r *Router) uixtActionHandler(c *gin.Context) {
return
}
if err = dExt.ExecuteAction(c.Request.Context(), req); err != nil {
if _, err = dExt.ExecuteAction(c.Request.Context(), req); err != nil {
log.Err(err).Interface("action", req).
Msg("exec uixt action failed")
RenderError(c, err)
@@ -42,7 +42,7 @@ func (r *Router) uixtActionsHandler(c *gin.Context) {
}
for _, action := range actions {
if err = dExt.ExecuteAction(c.Request.Context(), action); err != nil {
if _, err = dExt.ExecuteAction(c.Request.Context(), action); err != nil {
log.Err(err).Interface("action", action).
Msg("exec uixt action failed")
RenderError(c, err)