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

Function parsePaneMetrics

src/testing/tmuxHarness.ts:338–360  ·  view source on GitHub ↗
(output: string)

Source from the content-addressed store, hash-verified

336}
337
338function parsePaneMetrics(output: string): Omit<TmuxTraceFrame, 'label' | 'pane'> {
339 const [cursorX, cursorY, historySize, paneWidth, paneHeight] = output
340 .trim()
341 .split(',')
342
343 if (
344 cursorX === undefined ||
345 cursorY === undefined ||
346 historySize === undefined ||
347 paneWidth === undefined ||
348 paneHeight === undefined
349 ) {
350 throw new Error(`Unable to parse pane metrics: ${output}`)
351 }
352
353 return {
354 cursorX: Number.parseInt(cursorX, 10),
355 cursorY: Number.parseInt(cursorY, 10),
356 historySize: Number.parseInt(historySize, 10),
357 paneWidth: Number.parseInt(paneWidth, 10),
358 paneHeight: Number.parseInt(paneHeight, 10),
359 }
360}
361
362export function capturePaneFrame(
363 session: IsolatedTmuxSession,

Callers 1

capturePaneFrameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected