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

Function newMemoryProviderEnableCommand

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

Source from the content-addressed store, hash-verified

1129}
1130
1131func newMemoryProviderEnableCommand(deps commandDeps) *cobra.Command {
1132 return &cobra.Command{
1133 Use: cliUseEnableName,
1134 Short: "Enable and select one Memory v2 provider",
1135 Args: exactOneNonBlankArg(),
1136 RunE: func(cmd *cobra.Command, args []string) error {
1137 client, err := clientFromDeps(deps)
1138 if err != nil {
1139 return err
1140 }
1141 name := strings.TrimSpace(args[0])
1142 response, err := client.EnableMemoryProvider(
1143 cmd.Context(),
1144 name,
1145 MemoryProviderLifecycleRequest{},
1146 )
1147 if err != nil {
1148 return err
1149 }
1150 return writeCommandOutput(cmd, memoryObjectBundle("Memory Provider", response))
1151 },
1152 }
1153}
1154
1155func newMemoryProviderDisableCommand(deps commandDeps) *cobra.Command {
1156 return &cobra.Command{

Callers 1

newMemoryProviderCommandFunction · 0.85

Calls 5

exactOneNonBlankArgFunction · 0.85
clientFromDepsFunction · 0.85
writeCommandOutputFunction · 0.85
memoryObjectBundleFunction · 0.85
EnableMemoryProviderMethod · 0.65

Tested by

no test coverage detected