Clear any currently displayed status lines.
()
| 122 | |
| 123 | /** Clear any currently displayed status lines. */ |
| 124 | function clearStatusLines(): void { |
| 125 | if (statusLineCount <= 0) return |
| 126 | logForDebugging(`[bridge:ui] clearStatusLines count=${statusLineCount}`) |
| 127 | // Move cursor up to the start of the status block, then erase everything below |
| 128 | write(`\x1b[${statusLineCount}A`) // cursor up N lines |
| 129 | write('\x1b[J') // erase from cursor to end of screen |
| 130 | statusLineCount = 0 |
| 131 | } |
| 132 | |
| 133 | /** Print a permanent log line, clearing status first and restoring after. */ |
| 134 | function printLog(line: string): void { |
no test coverage detected