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

Function computeTerminalLayout

cli/src/hooks/use-terminal-layout.ts:150–163  ·  view source on GitHub ↗
(
  terminalWidth: number,
  terminalHeight: number,
)

Source from the content-addressed store, hash-verified

148 * Exported for testing purposes.
149 */
150export const computeTerminalLayout = (
151 terminalWidth: number,
152 terminalHeight: number,
153): TerminalLayout => {
154 const widthSize = getWidthSize(terminalWidth)
155 const heightSize = getHeightSize(terminalHeight)
156
157 return {
158 width: createWidthHelper(widthSize),
159 height: createHeightHelper(heightSize),
160 terminalWidth,
161 terminalHeight,
162 }
163}
164
165/**
166 * Hook providing semantic terminal layout information.

Callers 2

useTerminalLayoutFunction · 0.85

Calls 4

getWidthSizeFunction · 0.85
getHeightSizeFunction · 0.85
createWidthHelperFunction · 0.85
createHeightHelperFunction · 0.85

Tested by

no test coverage detected