This reverts commit d7cfa7f0b2.
This commit is contained in:
committed by
GitHub
parent
1e5b3f501f
commit
d54abc3ed0
@@ -6,7 +6,6 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/mudler/LocalAgent/core/agent"
|
||||
"github.com/mudler/LocalAgent/pkg/metaform"
|
||||
"github.com/mudler/LocalAgent/pkg/xlog"
|
||||
"github.com/mudler/LocalAgent/services/actions"
|
||||
irc "github.com/thoj/go-ircevent"
|
||||
@@ -44,51 +43,6 @@ func (i *IRC) AgentReasoningCallback() func(state agent.ActionCurrentState) bool
|
||||
}
|
||||
}
|
||||
|
||||
func (i *IRC) ConfigForm() metaform.Form {
|
||||
return metaform.Form{
|
||||
Fields: []metaform.Field{
|
||||
{
|
||||
Kind: metaform.FieldString,
|
||||
Name: "server",
|
||||
Label: "Server",
|
||||
Required: true,
|
||||
Placeholder: "chat.freenode.net",
|
||||
},
|
||||
{
|
||||
Kind: metaform.FieldString,
|
||||
Name: "port",
|
||||
Label: "Port",
|
||||
Required: true,
|
||||
Placeholder: "6667",
|
||||
},
|
||||
{
|
||||
Kind: metaform.FieldString,
|
||||
Name: "nickname",
|
||||
Label: "Nickname",
|
||||
Required: true,
|
||||
Placeholder: "LocalAgentBot",
|
||||
},
|
||||
{
|
||||
Kind: metaform.FieldString,
|
||||
Name: "channel",
|
||||
Label: "Channel",
|
||||
Required: true,
|
||||
Placeholder: "#general",
|
||||
},
|
||||
{
|
||||
Kind: metaform.FieldOptions,
|
||||
Name: "alwaysReply",
|
||||
Label: "Always Reply",
|
||||
Required: true,
|
||||
Options: []metaform.Option{
|
||||
{Value: "false", Label: "Only when mentioned"},
|
||||
{Value: "true", Label: "Reply to all messages"},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// cleanUpUsernameFromMessage removes the bot's nickname from the message
|
||||
func cleanUpMessage(message string, nickname string) string {
|
||||
cleaned := strings.ReplaceAll(message, nickname+":", "")
|
||||
|
||||
Reference in New Issue
Block a user