findToolByName returns the tool with the given name from the slice, or nil if no match is found.
(tools []fantasy.AgentTool, name string)
| 702 | // findToolByName returns the tool with the given name from the |
| 703 | // slice, or nil if no match is found. |
| 704 | func findToolByName(tools []fantasy.AgentTool, name string) fantasy.AgentTool { |
| 705 | for _, tool := range tools { |
| 706 | if tool.Info().Name == name { |
| 707 | return tool |
| 708 | } |
| 709 | } |
| 710 | return nil |
| 711 | } |
| 712 | |
| 713 | func chatdTestContext(t *testing.T) context.Context { |
| 714 | t.Helper() |
no test coverage detected