mirror of
https://github.com/YspCoder/clawgo.git
synced 2026-05-03 21:02:31 +08:00
extend message actions and persist process logs with safer exec defaults
This commit is contained in:
@@ -101,12 +101,15 @@ func NewAgentLoop(cfg *config.Config, msgBus *bus.MessageBus, provider providers
|
||||
|
||||
// Register message tool
|
||||
messageTool := tools.NewMessageTool()
|
||||
messageTool.SetSendCallback(func(channel, chatID, content string, buttons [][]bus.Button) error {
|
||||
messageTool.SetSendCallback(func(channel, chatID, action, content, messageID, emoji string, buttons [][]bus.Button) error {
|
||||
msgBus.PublishOutbound(bus.OutboundMessage{
|
||||
Channel: channel,
|
||||
ChatID: chatID,
|
||||
Content: content,
|
||||
Buttons: buttons,
|
||||
Channel: channel,
|
||||
ChatID: chatID,
|
||||
Content: content,
|
||||
Buttons: buttons,
|
||||
Action: action,
|
||||
MessageID: messageID,
|
||||
Emoji: emoji,
|
||||
})
|
||||
return nil
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user