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

@@ -8,6 +8,7 @@ import (
"github.com/google/go-github/v69/github"
"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/sashabaranov/go-openai"
@@ -195,3 +196,39 @@ func (g *GithubIssues) issuesService() {
}
}
}
// GithubIssueConfigMeta returns the metadata for GitHub Issues connector configuration fields
func GithubIssueConfigMeta() []config.Field {
return []config.Field{
{
Name: "token",
Label: "GitHub Token",
Type: config.FieldTypeText,
Required: true,
},
{
Name: "repository",
Label: "Repository",
Type: config.FieldTypeText,
Required: true,
},
{
Name: "owner",
Label: "Owner",
Type: config.FieldTypeText,
Required: true,
},
{
Name: "replyIfNoReplies",
Label: "Reply If No Replies",
Type: config.FieldTypeCheckbox,
},
{
Name: "pollInterval",
Label: "Poll Interval",
Type: config.FieldTypeText,
DefaultValue: "10m",
HelpText: "How often to check for new issues (e.g., 10m, 1h)",
},
}
}