(rawValue: string)
| 229 | profileCheckpoint('main_tsx_imports_loaded'); |
| 230 | |
| 231 | function parseCliToolChoice(rawValue: string): |
| 232 | | { type: 'auto' } |
| 233 | | { type: 'any' } |
| 234 | | { type: 'tool'; name: string } { |
| 235 | const value = rawValue.trim() |
| 236 | const normalized = value.toLowerCase() |
| 237 | if (normalized === 'auto') return { type: 'auto' } |
| 238 | if (normalized === 'any' || normalized === 'required') return { type: 'any' } |
| 239 | if (value.length === 0) { |
| 240 | throw new InvalidArgumentError( |
| 241 | '--tool-choice must be auto, any, or a tool name', |
| 242 | ) |
| 243 | } |
| 244 | return { type: 'tool', name: value } |
| 245 | } |
| 246 | |
| 247 | function getCliToolChoiceOverride(): |
| 248 | | { type: 'auto' } |
no outgoing calls
no test coverage detected