True when the prompt carries text — a non-empty string or any prompt part.
(prompt: MediaPrompt)
| 18 | |
| 19 | /** True when the prompt carries text — a non-empty string or any prompt part. */ |
| 20 | function hasPromptContent(prompt: MediaPrompt): boolean { |
| 21 | return typeof prompt === 'string' |
| 22 | ? prompt.trim().length > 0 |
| 23 | : prompt.length > 0 |
| 24 | } |
| 25 | |
| 26 | /** |
| 27 | * Narrows a wire `MediaPrompt` to a text + image prompt for image-conditioned |