MCPcopy
hub / github.com/codeaashu/claude-code / getClearTerminalSequence

Function getClearTerminalSequence

src/ink/clearTerminal.ts:59–69  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

57 * Automatically detects terminal capabilities.
58 */
59export 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.

Callers 2

writeDiffToTerminalFunction · 0.85
clearTerminal.tsFile · 0.85

Calls 1

isModernWindowsTerminalFunction · 0.85

Tested by

no test coverage detected