| 1006 | |
| 1007 | func toolMemoryRecallQuery(original string, toolResults []map[string]any, executor *StreamingToolExecutor) string { |
| 1008 | parts := []string{strings.TrimSpace(original)} |
| 1009 | for _, result := range toolResults { |
| 1010 | toolUseID := stringFromAny(result["tool_use_id"]) |
| 1011 | if executor != nil { |
| 1012 | if slot := executor.GetSlot(toolUseID); slot != nil { |
| 1013 | parts = append(parts, strings.TrimSpace(slot.TC.Name)) |
| 1014 | if encoded, err := json.Marshal(slot.TC.Input); err == nil { |
| 1015 | parts = append(parts, string(encoded)) |
| 1016 | } |
| 1017 | } |