(src []tools.Tool)
| 494 | } |
| 495 | |
| 496 | func cloneToolDefinitions(src []tools.Tool) []tools.Tool { |
| 497 | if src == nil { |
| 498 | return nil |
| 499 | } |
| 500 | out := make([]tools.Tool, len(src)) |
| 501 | for i, tool := range src { |
| 502 | out[i] = tool |
| 503 | out[i].Parameters = cloneSchemaValue(tool.Parameters) |
| 504 | out[i].OutputSchema = cloneSchemaValue(tool.OutputSchema) |
| 505 | out[i].Annotations = cloneToolAnnotations(tool.Annotations) |
| 506 | } |
| 507 | return out |
| 508 | } |
| 509 | |
| 510 | func cloneToolAnnotations(src tools.ToolAnnotations) tools.ToolAnnotations { |
| 511 | cp := src |
no test coverage detected