feat: implement MCP hooks integration with anti_risk option

This commit is contained in:
lilong.129
2025-05-27 19:46:08 +08:00
parent f4cc74b3ca
commit 866cc0e4d2
10 changed files with 222 additions and 38 deletions

View File

@@ -19,7 +19,7 @@ func (r *Router) uixtActionHandler(c *gin.Context) {
return
}
if err = dExt.ExecuteAction(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(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)