(promptExamples: string[] | undefined)
| 36 | } |
| 37 | |
| 38 | function normalizePromptExamples(promptExamples: string[] | undefined): string[] | undefined { |
| 39 | if (!Array.isArray(promptExamples)) { |
| 40 | return undefined; |
| 41 | } |
| 42 | |
| 43 | const normalized = promptExamples |
| 44 | .filter((value): value is string => typeof value === "string") |
| 45 | .map((value) => value.trim()) |
| 46 | .filter(Boolean); |
| 47 | |
| 48 | return normalized.length > 0 ? normalized : undefined; |
| 49 | } |
| 50 | |
| 51 | function validateScheduledJobConfig( |
| 52 | value: unknown, |
no outgoing calls
no test coverage detected