HasLevel reports whether the given target level exists in the levels slice. Matching is case-insensitive with leading/trailing whitespace trimmed.
(levels []string, target string)
| 99 | // HasLevel reports whether the given target level exists in the levels slice. |
| 100 | // Matching is case-insensitive with leading/trailing whitespace trimmed. |
| 101 | func HasLevel(levels []string, target string) bool { |
| 102 | for _, level := range levels { |
| 103 | if strings.EqualFold(strings.TrimSpace(level), target) { |
| 104 | return true |
| 105 | } |
| 106 | } |
| 107 | return false |
| 108 | } |
| 109 | |
| 110 | // MapToClaudeEffort maps a generic thinking level string to a Claude adaptive |
| 111 | // thinking effort value (low/medium/high/max). |
no outgoing calls
no test coverage detected