MCPcopy Create free account
hub / github.com/codeaashu/claude-code / getColumns

Function getColumns

web/lib/terminal-compat.ts:14–23  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

12
13/** Terminal column count (characters wide). Falls back to window character width. */
14export function getColumns(): number {
15 if (isWeb) {
16 // Approximate character columns: window width / ~8px per monospace char
17 if (typeof window !== "undefined") {
18 return Math.floor(window.innerWidth / 8);
19 }
20 return 120;
21 }
22 return (typeof process !== "undefined" && process.stdout?.columns) || 80;
23}
24
25/** Terminal row count. Falls back to window character height. */
26export function getRows(): number {

Callers 1

terminal-compat.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected