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

Function newTaskDeleteCommand

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

Source from the content-addressed store, hash-verified

636}
637
638func newTaskDeleteCommand(deps commandDeps) *cobra.Command {
639 cmd := &cobra.Command{
640 Use: taskDeleteIDValue,
641 Short: "Delete a task",
642 Args: exactOneNonBlankArg(),
643 RunE: func(cmd *cobra.Command, args []string) error {
644 client, err := clientFromDeps(deps)
645 if err != nil {
646 return err
647 }
648 if err := client.DeleteTask(cmd.Context(), args[0]); err != nil {
649 return err
650 }
651 return writeCommandOutput(cmd, taskDeleteBundle(args[0]))
652 },
653 }
654 return cmd
655}
656
657func newTaskProfileCommand(deps commandDeps) *cobra.Command {
658 cmd := &cobra.Command{

Callers 1

newTaskCommandFunction · 0.85

Calls 5

exactOneNonBlankArgFunction · 0.85
clientFromDepsFunction · 0.85
writeCommandOutputFunction · 0.85
taskDeleteBundleFunction · 0.85
DeleteTaskMethod · 0.65

Tested by

no test coverage detected