( ctx context.Context, scope toolspkg.Scope, req toolspkg.CallRequest, )
| 2377 | } |
| 2378 | |
| 2379 | func (n *daemonNativeTools) memoryShow( |
| 2380 | ctx context.Context, |
| 2381 | scope toolspkg.Scope, |
| 2382 | req toolspkg.CallRequest, |
| 2383 | ) (toolspkg.ToolResult, error) { |
| 2384 | var input memoryShowInput |
| 2385 | if err := decodeNativeInput(req, &input); err != nil { |
| 2386 | return toolspkg.ToolResult{}, err |
| 2387 | } |
| 2388 | location, err := n.resolveMemoryLocation(ctx, scope, req.ToolID, input.Filename, memoryToolSelector{ |
| 2389 | Scope: input.Scope, |
| 2390 | Workspace: input.Workspace, |
| 2391 | AgentName: input.AgentName, |
| 2392 | AgentTier: input.AgentTier, |
| 2393 | }) |
| 2394 | if err != nil { |
| 2395 | return toolspkg.ToolResult{}, nativeMemoryToolError(req.ToolID, err) |
| 2396 | } |
| 2397 | content, err := location.Store.Read(location.Scope, location.Filename) |
| 2398 | if err != nil { |
| 2399 | return toolspkg.ToolResult{}, nativeMemoryToolError(req.ToolID, err) |
| 2400 | } |
| 2401 | redactedContent := taskpkg.RedactClaimTokens(string(content)) |
| 2402 | return structuredResult(map[string]any{ |
| 2403 | "filename": location.Filename, |
| 2404 | nativeToolsScopeKey: location.Scope, |
| 2405 | nativeToolsWorkspaceKey: location.Workspace, |
| 2406 | "content": redactedContent, |
| 2407 | nativeToolsRedactedKey: redactedContent != string(content), |
| 2408 | }, location.Filename) |
| 2409 | } |
| 2410 | |
| 2411 | func (n *daemonNativeTools) memorySearch( |
| 2412 | ctx context.Context, |
nothing calls this directly
no test coverage detected