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

Function resolveMemoryScopeAndWorkspace

internal/api/core/memory.go:2552–2565  ·  view source on GitHub ↗
(rawScope string, rawWorkspace string)

Source from the content-addressed store, hash-verified

2550}
2551
2552func resolveMemoryScopeAndWorkspace(rawScope string, rawWorkspace string) (memcontract.Scope, string, error) {
2553 scope, err := parseOptionalMemoryScope(rawScope)
2554 if err != nil {
2555 return "", "", err
2556 }
2557 if scope == memcontract.ScopeWorkspace || strings.TrimSpace(rawWorkspace) != "" {
2558 workspace, err := resolveMemoryWorkspace(rawWorkspace)
2559 if err != nil {
2560 return "", "", err
2561 }
2562 return scope, workspace, nil
2563 }
2564 return scope, "", nil
2565}
2566
2567func parseMemoryLimit(raw string) (int, error) {
2568 trimmed := strings.TrimSpace(raw)

Callers 1

parseMemoryHistoryQueryFunction · 0.85

Calls 2

parseOptionalMemoryScopeFunction · 0.70
resolveMemoryWorkspaceFunction · 0.70

Tested by

no test coverage detected