(reader: string, text: string)
| 340 | |
| 341 | /** The user half of the reader prompt. */ |
| 342 | export function buildReaderPrompt(reader: string, text: string): string { |
| 343 | const lines = text.split('\n').length; |
| 344 | const voice = READER_VOICES[reader]; |
| 345 | return [ |
| 346 | `Reword these ${lines} sentences for a ${reader}. Same count, same order, same names and numbers.`, |
| 347 | ...(voice === undefined ? [] : ['', voice]), |
| 348 | '', |
| 349 | text, |
| 350 | ].join('\n'); |
| 351 | } |