diff options
| author | Omni Worker <bot@omni.agent> | 2025-11-21 23:02:34 -0500 |
|---|---|---|
| committer | Omni Worker <bot@omni.agent> | 2025-11-21 23:02:34 -0500 |
| commit | 029b1018432973f9631562268d01af8919f5113c (patch) | |
| tree | 4850eb80efb9dfcdfde7f601b677a06516a11bc0 | |
| parent | 79e42cb2736135477b7c38873c6233ac9b01ea69 (diff) | |
feat(task): support updating dependencies via CLI
Amp-Thread-ID:
https://ampcode.com/threads/T-79499d9e-f4f4-40de-893c-524c32a45483
Co-authored-by: Amp <amp@ampcode.com>
| -rw-r--r-- | Omni/Task.hs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Omni/Task.hs b/Omni/Task.hs index f19ab73..5008dd2 100644 --- a/Omni/Task.hs +++ b/Omni/Task.hs @@ -44,7 +44,7 @@ Usage: task list [options] task ready [--json] task show <id> [--json] - task update <id> <status> [--deps=<ids>] [--dep-type=<type>] [--json] + task update <id> <status> [options] task deps <id> [--json] task tree [<id>] [--json] task progress <id> [--json] @@ -214,9 +214,9 @@ move args | args `Cli.has` Cli.command "update" = do tid <- getArgText args "id" statusStr <- getArgText args "status" - + -- Handle update dependencies - (deps, depType) <- do + deps <- do -- Parse --deps and --dep-type ids <- case Cli.getArg args (Cli.longOption "deps") of Nothing -> pure [] @@ -228,7 +228,7 @@ move args Just "parent-child" -> pure ParentChild Just "related" -> pure Related Just other -> panic <| "Invalid dependency type: " <> T.pack other <> ". Use: blocks, discovered-from, parent-child, or related" - pure (map (\d -> Dependency {depId = d, depType = dtype}) ids, dtype) + pure (map (\d -> Dependency {depId = d, depType = dtype}) ids) let newStatus = case statusStr of "open" -> Open @@ -236,7 +236,7 @@ move args "review" -> Review "done" -> Done _ -> panic "Invalid status. Use: open, in-progress, review, or done" - + updateTaskStatus tid newStatus deps if isJsonMode args then outputSuccess <| "Updated task " <> tid |
