( ctx context.Context, callerScope toolspkg.Scope, id toolspkg.ToolID, selector memoryToolSelector, )
| 5270 | } |
| 5271 | |
| 5272 | func (n *daemonNativeTools) memoryRecallStore( |
| 5273 | ctx context.Context, |
| 5274 | callerScope toolspkg.Scope, |
| 5275 | id toolspkg.ToolID, |
| 5276 | selector memoryToolSelector, |
| 5277 | ) (memoryToolLocation, error) { |
| 5278 | scope, err := core.ParseOptionalMemoryScope(selector.Scope) |
| 5279 | if err != nil { |
| 5280 | return memoryToolLocation{}, err |
| 5281 | } |
| 5282 | if scope == "" { |
| 5283 | if strings.TrimSpace(firstNonEmpty(selector.AgentName, callerScope.AgentName)) != "" { |
| 5284 | scope = memcontract.ScopeAgent |
| 5285 | } else if strings.TrimSpace(firstNonEmpty(selector.Workspace, callerScope.WorkspaceID)) != "" { |
| 5286 | scope = memcontract.ScopeWorkspace |
| 5287 | } |
| 5288 | } |
| 5289 | return n.memoryStoreFor(ctx, callerScope, id, selector, scope) |
| 5290 | } |
| 5291 | |
| 5292 | func (n *daemonNativeTools) memoryWriteStore( |
| 5293 | ctx context.Context, |
no test coverage detected