(options)
| 271 | } |
| 272 | |
| 273 | async function getInitialPrompt(options) { |
| 274 | if (options.prompt) { |
| 275 | return options.prompt |
| 276 | } |
| 277 | |
| 278 | if (!process.stdin.isTTY) { |
| 279 | const text = await fs.readFile(process.stdin.fd, 'utf8').catch(() => '') |
| 280 | return text.trim() |
| 281 | } |
| 282 | |
| 283 | return '' |
| 284 | } |
| 285 | |
| 286 | function parseArgs(argv) { |
| 287 | const options = { |