(callback: () => void)
| 31 | */ |
| 32 | async function askQuestion(prompt: string, enableHistory: boolean): Promise<string | null> { |
| 33 | while (true) { |
| 34 | const rl = readline.createInterface({ |
| 35 | input: process.stdin, |
| 36 | output: process.stdout, |
| 37 | ...(enableHistory ? { history: [...history], historySize } : {}), |
| 38 | }); |
| 39 | |
| 40 | const sigcontAbortController = new AbortController(); |
| 41 | |
| 42 | rl.on('SIGCONT', () => { |