(ctx context.Context, namespace string, input map[string]any)
| 156 | } |
| 157 | |
| 158 | func (t *LogicMemoryQueryTool) get(ctx context.Context, namespace string, input map[string]any) (string, error) { |
| 159 | key, ok := input["key"].(string) |
| 160 | if !ok || key == "" { |
| 161 | return "", errors.New("key is required for 'get' action") |
| 162 | } |
| 163 | |
| 164 | memory, err := t.manager.GetMemory(ctx, namespace, key) |
| 165 | if err != nil { |
| 166 | return "", fmt.Errorf("memory not found: %w", err) |
| 167 | } |
| 168 | |
| 169 | return t.formatSingleMemoryAsMarkdown(memory), nil |
| 170 | } |
| 171 | |
| 172 | func (t *LogicMemoryQueryTool) search(ctx context.Context, namespace string, input map[string]any) (string, error) { |
| 173 | memoryType, ok := input["type"].(string) |
no test coverage detected