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

Function newTaskGetCommand

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

Source from the content-addressed store, hash-verified

434}
435
436func newTaskGetCommand(deps commandDeps) *cobra.Command {
437 return &cobra.Command{
438 Use: taskGetIDValue,
439 Short: "Show one task with related detail",
440 Args: exactOneNonBlankArg(),
441 RunE: func(cmd *cobra.Command, args []string) error {
442 client, err := clientFromDeps(deps)
443 if err != nil {
444 return err
445 }
446
447 taskDetail, err := client.GetTask(cmd.Context(), args[0])
448 if err != nil {
449 return err
450 }
451 return writeCommandOutput(cmd, taskDetailBundle(&taskDetail))
452 },
453 }
454}
455
456func newTaskInspectCommand(deps commandDeps) *cobra.Command {
457 return &cobra.Command{

Callers 1

newTaskCommandFunction · 0.85

Calls 5

exactOneNonBlankArgFunction · 0.85
clientFromDepsFunction · 0.85
writeCommandOutputFunction · 0.85
taskDetailBundleFunction · 0.85
GetTaskMethod · 0.65

Tested by

no test coverage detected