(tail: string)
| 37 | // directed questions |
| 38 | /Press (any key|Enter)/i, /Continue\?/i, /Overwrite\?/i]; |
| 39 | export function looksLikePrompt(tail: string): boolean { |
| 40 | const lastLine = tail.trimEnd().split('\n').pop() ?? ''; |
| 41 | return PROMPT_PATTERNS.some(p => p.test(lastLine)); |
| 42 | } |
| 43 | |
| 44 | // Output-side analog of peekForStdinData (utils/process.ts): fire a one-shot |
| 45 | // notification if output stops growing and the tail looks like a prompt. |
no test coverage detected