fix(slack): do not convert, mention user when summoned by mentions

Signed-off-by: mudler <mudler@localai.io>
This commit is contained in:
mudler
2025-03-24 15:41:57 +01:00
parent 14948c965d
commit c8abc5f28f

View File

@@ -208,7 +208,7 @@ func (t *Slack) handleChannelMessage(
agentOptions..., agentOptions...,
) )
res.Response = githubmarkdownconvertergo.Slack(res.Response) //res.Response = githubmarkdownconvertergo.Slack(res.Response)
_, _, err = api.PostMessage(ev.Channel, _, _, err = api.PostMessage(ev.Channel,
slack.MsgOptionLinkNames(true), slack.MsgOptionLinkNames(true),
@@ -458,7 +458,8 @@ func (t *Slack) handleMention(
) )
// Format the final response // Format the final response
finalResponse := githubmarkdownconvertergo.Slack(res.Response) //finalResponse := githubmarkdownconvertergo.Slack(res.Response)
finalResponse := fmt.Sprintf("@%s %s", ev.User, res.Response)
// Update the placeholder message with the final result // Update the placeholder message with the final result
t.placeholderMutex.RLock() t.placeholderMutex.RLock()