()
| 57 | * Automatically detects terminal capabilities. |
| 58 | */ |
| 59 | export function getClearTerminalSequence(): string { |
| 60 | if (process.platform === 'win32') { |
| 61 | if (isModernWindowsTerminal()) { |
| 62 | return ERASE_SCREEN + ERASE_SCROLLBACK + CURSOR_HOME |
| 63 | } else { |
| 64 | // Legacy Windows console - can't clear scrollback |
| 65 | return ERASE_SCREEN + CURSOR_HOME_WINDOWS |
| 66 | } |
| 67 | } |
| 68 | return ERASE_SCREEN + ERASE_SCROLLBACK + CURSOR_HOME |
| 69 | } |
| 70 | |
| 71 | /** |
| 72 | * Clears the terminal screen. On supported terminals, also clears scrollback. |
no test coverage detected