MCPcopy Create free account
hub / github.com/Noumena-Network/code / selectObservedFrameRows

Function selectObservedFrameRows

src/commands/repaint/repaint.ts:92–103  ·  view source on GitHub ↗
(
  tmuxPaneText: string | undefined,
  frameHeight: number,
  paneHeight: number | undefined,
)

Source from the content-addressed store, hash-verified

90}
91
92export function selectObservedFrameRows(
93 tmuxPaneText: string | undefined,
94 frameHeight: number,
95 paneHeight: number | undefined,
96): string[] {
97 if (!tmuxPaneText || frameHeight <= 0) return []
98 const lines = tmuxPaneText.split('\n').map(row => row.trimEnd())
99 const visibleHeight =
100 paneHeight !== undefined && paneHeight > 0 ? paneHeight : frameHeight
101 const visibleRows = lines.slice(-visibleHeight)
102 return visibleRows.slice(0, frameHeight)
103}
104
105function buildRendererStructuralProbe(
106 ink: InkLike | undefined,

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected