MCPcopy Create free account
hub / github.com/compozy/agh / newTaskBlocksCommand

Function newTaskBlocksCommand

internal/cli/task.go:1522–1542  ·  view source on GitHub ↗
(deps commandDeps)

Source from the content-addressed store, hash-verified

1520}
1521
1522func newTaskBlocksCommand(deps commandDeps) *cobra.Command {
1523 var includeCleared bool
1524 cmd := &cobra.Command{
1525 Use: "blocks <id>",
1526 Short: "List task blocks",
1527 Args: exactOneNonBlankArg(),
1528 RunE: func(cmd *cobra.Command, args []string) error {
1529 client, err := clientFromDeps(deps)
1530 if err != nil {
1531 return err
1532 }
1533 blocks, err := client.ListTaskBlocks(cmd.Context(), args[0], includeCleared)
1534 if err != nil {
1535 return err
1536 }
1537 return writeCommandOutput(cmd, taskBlockListBundle(blocks))
1538 },
1539 }
1540 cmd.Flags().BoolVar(&includeCleared, "all", false, "Include cleared blocks")
1541 return cmd
1542}
1543
1544func newTaskRecoverCommand(deps commandDeps) *cobra.Command {
1545 var note string

Callers 1

newTaskCommandFunction · 0.85

Calls 5

exactOneNonBlankArgFunction · 0.85
clientFromDepsFunction · 0.85
writeCommandOutputFunction · 0.85
taskBlockListBundleFunction · 0.85
ListTaskBlocksMethod · 0.65

Tested by

no test coverage detected