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

Method Select

internal/daemon/memory_runtime.go:938–953  ·  view source on GitHub ↗
(
	ctx context.Context,
	workspaceID string,
	name string,
)

Source from the content-addressed store, hash-verified

936}
937
938func (s daemonMemoryProviderService) Select(
939 ctx context.Context,
940 workspaceID string,
941 name string,
942) (contract.MemoryProviderPayload, error) {
943 if s.registry == nil {
944 return contract.MemoryProviderPayload{}, errors.New("daemon: memory provider registry is not configured")
945 }
946 if err := s.registry.SetActive(ctx, workspaceID, name); err != nil {
947 if isMemoryProviderNotFound(err) {
948 return contract.MemoryProviderPayload{}, fmt.Errorf("%w: %w", os.ErrNotExist, err)
949 }
950 return contract.MemoryProviderPayload{}, err
951 }
952 return s.Get(ctx, workspaceID, name)
953}
954
955func (s daemonMemoryProviderService) Enable(
956 ctx context.Context,

Callers

nothing calls this directly

Calls 3

GetMethod · 0.95
isMemoryProviderNotFoundFunction · 0.85
SetActiveMethod · 0.80

Tested by

no test coverage detected