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

Function newMemoryProviderDisableCommand

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

Source from the content-addressed store, hash-verified

1153}
1154
1155func newMemoryProviderDisableCommand(deps commandDeps) *cobra.Command {
1156 return &cobra.Command{
1157 Use: cliUseDisableName,
1158 Short: "Disable one Memory v2 provider",
1159 Args: exactOneNonBlankArg(),
1160 RunE: func(cmd *cobra.Command, args []string) error {
1161 client, err := clientFromDeps(deps)
1162 if err != nil {
1163 return err
1164 }
1165 name := strings.TrimSpace(args[0])
1166 response, err := client.DisableMemoryProvider(
1167 cmd.Context(),
1168 name,
1169 MemoryProviderLifecycleRequest{},
1170 )
1171 if err != nil {
1172 return err
1173 }
1174 return writeCommandOutput(cmd, memoryObjectBundle("Memory Provider", response))
1175 },
1176 }
1177}
1178
1179func newMemoryAdhocCommand() *cobra.Command {
1180 cmd := &cobra.Command{

Callers 1

newMemoryProviderCommandFunction · 0.85

Calls 5

exactOneNonBlankArgFunction · 0.85
clientFromDepsFunction · 0.85
writeCommandOutputFunction · 0.85
memoryObjectBundleFunction · 0.85
DisableMemoryProviderMethod · 0.65

Tested by

no test coverage detected