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

@@ -5,6 +5,7 @@ import (
"fmt"
"github.com/mudler/LocalAgent/core/types"
"github.com/mudler/LocalAgent/pkg/config"
"github.com/mudler/LocalAgent/services/connectors/twitter"
"github.com/sashabaranov/go-openai/jsonschema"
)
@@ -62,3 +63,22 @@ func (a *PostTweetAction) Definition() types.ActionDefinition {
func (a *PostTweetAction) Plannable() bool {
return true
}
// TwitterPostConfigMeta returns the metadata for Twitter Post action configuration fields
func TwitterPostConfigMeta() []config.Field {
return []config.Field{
{
Name: "token",
Label: "Twitter API Token",
Type: config.FieldTypeText,
Required: true,
HelpText: "Twitter API token for posting tweets",
},
{
Name: "noCharacterLimit",
Label: "No Character Limit",
Type: config.FieldTypeCheckbox,
HelpText: "If checked, tweets longer than the character limit will be split into multiple tweets",
},
}
}