* Formats a parameter name for user-friendly error messages * Converts parameter names and descriptions to more readable format
(paramName: string)
| 145 | * Converts parameter names and descriptions to more readable format |
| 146 | */ |
| 147 | function formatParameterNameForError(paramName: string): string { |
| 148 | // Split camelCase and snake_case/kebab-case into words, then capitalize first letter of each word |
| 149 | return paramName |
| 150 | .split(/(?=[A-Z])|[_-]/) |
| 151 | .filter(Boolean) |
| 152 | .map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()) |
| 153 | .join(' ') |
| 154 | } |
| 155 | |
| 156 | /** |
| 157 | * Validates required parameters after LLM and user params have been merged |
no test coverage detected