chore(ui): Move some field definitions server side

This commit is contained in:
Richard Palethorpe
2025-03-26 15:56:14 +00:00
parent 7fb99ecf21
commit 319caf8e91
62 changed files with 1534 additions and 1574 deletions

View File

@@ -7,6 +7,7 @@ import (
"github.com/mudler/LocalAgent/core/agent"
"github.com/mudler/LocalAgent/core/types"
"github.com/mudler/LocalAgent/pkg/config"
"github.com/mudler/LocalAgent/pkg/xlog"
"github.com/mudler/LocalAgent/services/actions"
"github.com/sashabaranov/go-openai"
@@ -207,3 +208,44 @@ func (i *IRC) Start(a *agent.Agent) {
// Start the IRC client in a goroutine
go i.conn.Loop()
}
// IRCConfigMeta returns the metadata for IRC connector configuration fields
func IRCConfigMeta() []config.Field {
return []config.Field{
{
Name: "server",
Label: "IRC Server",
Type: config.FieldTypeText,
Required: true,
},
{
Name: "port",
Label: "Port",
Type: config.FieldTypeText,
Required: true,
},
{
Name: "nickname",
Label: "Nickname",
Type: config.FieldTypeText,
Required: true,
},
{
Name: "channel",
Label: "Channel",
Type: config.FieldTypeText,
Required: true,
},
{
Name: "alwaysReply",
Label: "Always Reply",
Type: config.FieldTypeCheckbox,
},
{
Name: "lastMessageDuration",
Label: "Last Message Duration",
Type: config.FieldTypeText,
DefaultValue: "5m",
},
}
}