32 lines
1.3 KiB
Go
32 lines
1.3 KiB
Go
package examples
|
|
|
|
import (
|
|
"embed"
|
|
"git.a-wan.net/alan/pipelines/internal/protocol"
|
|
"strings"
|
|
)
|
|
|
|
// Only checked-in Markdown examples are shipped. No runtime databases or user drafts.
|
|
//
|
|
//go:embed *.md
|
|
var sources embed.FS
|
|
|
|
var starters = []protocol.Template{
|
|
{Key: "task", Name: "Complete a task", Description: "One stage to complete a task in your repository and report actual results."},
|
|
{Key: "summary", Name: "Summarize text", Description: "One tool-free stage to summarize supplied text without inventing facts."},
|
|
{Key: "three-stage", Name: "Plan, implement, review", Description: "Plan a change, implement it, then review and verify it. Any language or file type."},
|
|
{Key: "review", Name: "Review a repository", Description: "One read-only stage to review repository content and report findings."},
|
|
{Key: "research", Name: "Research a topic", Description: "Research a topic on the web, then write a sourced report. Requires web search support."},
|
|
}
|
|
|
|
func Catalog() []protocol.Template {
|
|
result := make([]protocol.Template, 0, len(starters))
|
|
for _, item := range starters {
|
|
data, _ := sources.ReadFile(item.Key + ".md")
|
|
item.Source = string(data)
|
|
item.Scheduled = strings.Contains(item.Source, "```schedule")
|
|
result = append(result, item)
|
|
}
|
|
return result
|
|
}
|