summaryrefslogtreecommitdiff
path: root/internal/storage
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-03-08 00:59:48 +0000
committerPeter Stone <thepeterstone@gmail.com>2026-03-08 06:27:34 +0000
commit73d0d0a7fd49dee324c2cfc8816c6be93b07dac1 (patch)
treebb544f60d17cf82f38109325b9aad307a3e409ae /internal/storage
parentd422394021e4fb9ddb5405024468f03d962c5f5d (diff)
fix(storage): use Agent field instead of Claude in CreateTask
Diffstat (limited to 'internal/storage')
-rw-r--r--internal/storage/db.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/internal/storage/db.go b/internal/storage/db.go
index b3df696..31927a0 100644
--- a/internal/storage/db.go
+++ b/internal/storage/db.go
@@ -109,7 +109,7 @@ func isColumnExistsError(err error) bool {
// CreateTask inserts a task into the database.
func (s *DB) CreateTask(t *task.Task) error {
- configJSON, err := json.Marshal(t.Claude)
+ configJSON, err := json.Marshal(t.Agent)
if err != nil {
return fmt.Errorf("marshaling config: %w", err)
}
@@ -232,7 +232,7 @@ func (s *DB) RejectTask(id, comment string) error {
type TaskUpdate struct {
Name string
Description string
- Config task.ClaudeConfig
+ Config task.AgentConfig
Priority task.Priority
TimeoutNS int64
Retry task.RetryConfig
@@ -512,8 +512,8 @@ func scanTask(row scanner) (*task.Task, error) {
t.State = task.State(state)
t.Priority = task.Priority(priority)
t.Timeout.Duration = time.Duration(timeoutNS)
- if err := json.Unmarshal([]byte(configJSON), &t.Claude); err != nil {
- return nil, fmt.Errorf("unmarshaling config: %w", err)
+ if err := json.Unmarshal([]byte(configJSON), &t.Agent); err != nil {
+ return nil, fmt.Errorf("unmarshaling agent config: %w", err)
}
if err := json.Unmarshal([]byte(retryJSON), &t.Retry); err != nil {
return nil, fmt.Errorf("unmarshaling retry: %w", err)