(base *coretools.ToolRegistry, allowedTools []string)
| 119 | } |
| 120 | |
| 121 | func buildForkRegistry(base *coretools.ToolRegistry, allowedTools []string) *coretools.ToolRegistry { |
| 122 | if base == nil { |
| 123 | return coretools.NewToolRegistry() |
| 124 | } |
| 125 | if allowedTools != nil { |
| 126 | allow := map[string]struct{}{} |
| 127 | for _, tool := range allowedTools { |
| 128 | allow[tool] = struct{}{} |
| 129 | } |
| 130 | return base.FilteredCopy(allow, nil, false, false) |
| 131 | } |
| 132 | return base.FilteredCopy(nil, nil, true, false) |
| 133 | } |
| 134 | |
| 135 | func applyForkEffort(prompt string, effort any) string { |
| 136 | if effort == nil { |
no test coverage detected