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

Function newMemoryDecisionsShowCommand

internal/cli/memory.go:727–744  ·  view source on GitHub ↗
(deps commandDeps)

Source from the content-addressed store, hash-verified

725}
726
727func newMemoryDecisionsShowCommand(deps commandDeps) *cobra.Command {
728 return &cobra.Command{
729 Use: "show <id>",
730 Short: "Show one Memory v2 controller decision",
731 Args: exactOneNonBlankArg(),
732 RunE: func(cmd *cobra.Command, args []string) error {
733 client, err := clientFromDeps(deps)
734 if err != nil {
735 return err
736 }
737 response, err := client.GetMemoryDecision(cmd.Context(), strings.TrimSpace(args[0]))
738 if err != nil {
739 return err
740 }
741 return writeCommandOutput(cmd, memoryDecisionBundle("Memory Decision", response.Decision, response))
742 },
743 }
744}
745
746func newMemoryDecisionsRevertCommand(deps commandDeps) *cobra.Command {
747 var reason string

Callers 1

Calls 5

exactOneNonBlankArgFunction · 0.85
clientFromDepsFunction · 0.85
writeCommandOutputFunction · 0.85
memoryDecisionBundleFunction · 0.85
GetMemoryDecisionMethod · 0.65

Tested by

no test coverage detected