summaryrefslogtreecommitdiff
path: root/internal/cli
diff options
context:
space:
mode:
Diffstat (limited to 'internal/cli')
-rw-r--r--internal/cli/create.go13
-rw-r--r--internal/cli/status.go3
2 files changed, 11 insertions, 5 deletions
diff --git a/internal/cli/create.go b/internal/cli/create.go
index 396cd77..88f94ba 100644
--- a/internal/cli/create.go
+++ b/internal/cli/create.go
@@ -14,6 +14,7 @@ func newCreateCmd() *cobra.Command {
serverURL string
instructions string
workingDir string
+ repoURL string
model string
agentType string
parentID string
@@ -28,13 +29,14 @@ func newCreateCmd() *cobra.Command {
Short: "Create a task via the running server",
Args: cobra.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
- return createTask(serverURL, args[0], instructions, workingDir, model, agentType, parentID, budget, timeout, priority, autoStart)
+ return createTask(serverURL, args[0], instructions, workingDir, repoURL, model, agentType, parentID, budget, timeout, priority, autoStart)
},
}
cmd.Flags().StringVar(&serverURL, "server", defaultServerURL, "claudomator server URL")
cmd.Flags().StringVarP(&instructions, "instructions", "i", "", "task instructions (required)")
cmd.Flags().StringVarP(&workingDir, "working-dir", "d", "", "working directory for the task")
+ cmd.Flags().StringVar(&repoURL, "repository-url", "", "repository URL for cloning")
cmd.Flags().StringVarP(&model, "model", "m", "", "model to use")
cmd.Flags().StringVar(&agentType, "agent-type", "claude", "agent type: claude, gemini")
cmd.Flags().StringVar(&parentID, "parent-id", "", "parent task ID (makes this a subtask)")
@@ -47,11 +49,12 @@ func newCreateCmd() *cobra.Command {
return cmd
}
-func createTask(serverURL, name, instructions, workingDir, model, agentType, parentID string, budget float64, timeout, priority string, autoStart bool) error {
+func createTask(serverURL, name, instructions, workingDir, repoURL, model, agentType, parentID string, budget float64, timeout, priority string, autoStart bool) error {
body := map[string]interface{}{
- "name": name,
- "timeout": timeout,
- "priority": priority,
+ "name": name,
+ "timeout": timeout,
+ "priority": priority,
+ "repository_url": repoURL,
"agent": map[string]interface{}{
"type": agentType,
"instructions": instructions,
diff --git a/internal/cli/status.go b/internal/cli/status.go
index 77a30d5..ee787dd 100644
--- a/internal/cli/status.go
+++ b/internal/cli/status.go
@@ -59,6 +59,9 @@ func showStatus(id string) error {
dur := e.EndTime.Sub(e.StartTime)
fmt.Fprintf(w, " %.8s\t%s\t%d\t$%.4f\t%v\t%s\n",
e.ID, e.Status, e.ExitCode, e.CostUSD, dur.Round(1e9), e.StartTime.Format("15:04:05"))
+ if e.ErrorMsg != "" {
+ fmt.Fprintf(w, " Error: %s\n", e.ErrorMsg)
+ }
}
w.Flush()
}