MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / physicalRows

Function physicalRows

test/viewport.test.ts:46–47  ·  view source on GitHub ↗
(text: string, width: number)

Source from the content-addressed store, hash-verified

44 // even for code-heavy text (the boxed AssistantMessage would have, which caused the
45 // oscillation + non-stop scroll bug). We replicate StreamingView's height here.
46 const physicalRows = (text: string, width: number) =>
47 text.split('\n').reduce((n, ln) => n + Math.max(1, Math.ceil(ln.length / Math.max(20, width))), 0);
48
49 const cases = [
50 Array.from({ length: 200 }, (_, i) => `line ${i}`).join('\n'), // long prose

Callers 2

viewport.test.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected