Fix potential infinite loop in reaction tool by marking results as handled.

This commit is contained in:
stevef 2026-04-20 11:55:28 +02:00
parent c12c51593c
commit 337dfe960a
2 changed files with 4 additions and 3 deletions

View file

@ -81,7 +81,8 @@ func (t *ReactionTool) Execute(ctx context.Context, args map[string]any) *ToolRe
} }
return &ToolResult{ return &ToolResult{
ForLLM: fmt.Sprintf("Reaction added to %s:%s message %s", channel, chatID, messageID), ForLLM: fmt.Sprintf("Reaction added to %s:%s message %s", channel, chatID, messageID),
Silent: true, Silent: true,
ResponseHandled: true,
} }
} }

View file

@ -41,7 +41,7 @@ type ExecTool struct {
allowPatterns []*regexp.Regexp allowPatterns []*regexp.Regexp
customAllowPatterns []*regexp.Regexp customAllowPatterns []*regexp.Regexp
allowedPathPatterns []*regexp.Regexp allowedPathPatterns []*regexp.Regexp
denyWritePaths []*regexp.Regexp denyWritePaths []*regexp.Regexp
restrictToWorkspace bool restrictToWorkspace bool
allowRemote bool allowRemote bool
sessionManager *SessionManager sessionManager *SessionManager