summaryrefslogtreecommitdiff
path: root/internal/storage/templates.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/storage/templates.go')
-rw-r--r--internal/storage/templates.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/internal/storage/templates.go b/internal/storage/templates.go
index 350b4f8..57abaa4 100644
--- a/internal/storage/templates.go
+++ b/internal/storage/templates.go
@@ -18,7 +18,7 @@ type Template struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
- Claude task.ClaudeConfig `json:"claude"`
+ Agent task.AgentConfig `json:"agent"`
Timeout string `json:"timeout"`
Priority string `json:"priority"`
Tags []string `json:"tags"`
@@ -28,7 +28,7 @@ type Template struct {
// CreateTemplate inserts a new template.
func (s *DB) CreateTemplate(tmpl *Template) error {
- configJSON, err := json.Marshal(tmpl.Claude)
+ configJSON, err := json.Marshal(tmpl.Agent)
if err != nil {
return fmt.Errorf("marshaling config: %w", err)
}
@@ -73,7 +73,7 @@ func (s *DB) ListTemplates() ([]*Template, error) {
// UpdateTemplate fully replaces a template's fields. Returns ErrTemplateNotFound if the ID is missing.
func (s *DB) UpdateTemplate(tmpl *Template) error {
- configJSON, err := json.Marshal(tmpl.Claude)
+ configJSON, err := json.Marshal(tmpl.Agent)
if err != nil {
return fmt.Errorf("marshaling config: %w", err)
}
@@ -130,7 +130,7 @@ func scanTemplate(row scanner) (*Template, error) {
}
return nil, err
}
- if err := json.Unmarshal([]byte(configJSON), &tmpl.Claude); err != nil {
+ if err := json.Unmarshal([]byte(configJSON), &tmpl.Agent); err != nil {
return nil, fmt.Errorf("unmarshaling config: %w", err)
}
if err := json.Unmarshal([]byte(tagsJSON), &tmpl.Tags); err != nil {