MCPcopy Index your code
hub / github.com/codeaashu/claude-code / isModernWindowsTerminal

Function isModernWindowsTerminal

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

Source from the content-addressed store, hash-verified

30}
31
32function isModernWindowsTerminal(): boolean {
33 // Windows Terminal sets WT_SESSION environment variable
34 if (isWindowsTerminal()) {
35 return true
36 }
37
38 // VS Code integrated terminal on Windows with ConPTY support
39 if (
40 process.platform === 'win32' &&
41 process.env.TERM_PROGRAM === 'vscode' &&
42 process.env.TERM_PROGRAM_VERSION
43 ) {
44 return true
45 }
46
47 // mintty (GitBash/MSYS2/Cygwin) supports modern escape sequences
48 if (isMintty()) {
49 return true
50 }
51
52 return false
53}
54
55/**
56 * Returns the ANSI escape sequence to clear the terminal including scrollback.

Callers 1

getClearTerminalSequenceFunction · 0.85

Calls 2

isWindowsTerminalFunction · 0.85
isMinttyFunction · 0.85

Tested by

no test coverage detected