MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / getWidthSize

Function getWidthSize

cli/src/hooks/use-terminal-layout.ts:121–131  ·  view source on GitHub ↗
(terminalWidth: number)

Source from the content-addressed store, hash-verified

119 * Determine the width layout size from terminal width.
120 */
121const getWidthSize = (terminalWidth: number): TerminalWidthSize => {
122 if (terminalWidth < WIDTH_XS_BREAKPOINT) {
123 return 'xs'
124 } else if (terminalWidth > WIDTH_LG_BREAKPOINT) {
125 return 'lg'
126 } else if (terminalWidth > WIDTH_MD_BREAKPOINT) {
127 return 'md'
128 } else {
129 return 'sm'
130 }
131}
132
133/**
134 * Determine the height layout size from terminal height.

Callers 1

computeTerminalLayoutFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected