ParseLevelSuffix attempts to parse a raw suffix as a discrete thinking level. This function parses the raw suffix content (from ParseSuffix.RawSuffix) as a level. Only discrete effort levels are valid: minimal, low, medium, high, xhigh, max. Level matching is case-insensitive. Special values (none
(rawSuffix string)
| 124 | // - "8192" -> level="", ok=false (numeric, use ParseNumericSuffix) |
| 125 | // - "ultra" -> level="", ok=false (unknown level) |
| 126 | func ParseLevelSuffix(rawSuffix string) (level ThinkingLevel, ok bool) { |
| 127 | if rawSuffix == "" { |
| 128 | return "", false |
| 129 | } |
| 130 | |
| 131 | // Case-insensitive matching |
| 132 | switch strings.ToLower(rawSuffix) { |
| 133 | case "minimal": |
| 134 | return LevelMinimal, true |
| 135 | case "low": |
| 136 | return LevelLow, true |
| 137 | case "medium": |
| 138 | return LevelMedium, true |
| 139 | case "high": |
| 140 | return LevelHigh, true |
| 141 | case "xhigh": |
| 142 | return LevelXHigh, true |
| 143 | case "max": |
| 144 | return LevelMax, true |
| 145 | default: |
| 146 | return "", false |
| 147 | } |
| 148 | } |
no outgoing calls
no test coverage detected