()
| 111 | // printed by the PARENT on the main thread (TTY-aware, codepage-immune) — |
| 112 | // this worker's raw-byte path must never leave bytes in scrollback (#398). |
| 113 | function clearLine(): void { |
| 114 | if (!currentMessage) return; |
| 115 | writeStdout(`\r\x1b[K`); |
| 116 | currentMessage = ''; |
| 117 | currentPercent = -1; |
| 118 | currentCount = 0; |
| 119 | } |
| 120 | |
| 121 | // Render loop — independent of main thread |
| 122 | const tickInterval = setInterval(render, 50); |
no test coverage detected