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

Function recordNextRowContentEndFallback

src/ink/logUpdateRenderStats.ts:499–535  ·  view source on GitHub ↗
(stats: {
  nextRowContentEnd: number
  pendingWrap: boolean
  hasRemoved: boolean
  hasAdded: boolean
  nextCellEmpty: boolean
  nextCellKind?: 'visible-char' | 'styled-space' | 'spacer'
})

Source from the content-addressed store, hash-verified

497}
498
499export function recordNextRowContentEndFallback(stats: {
500 nextRowContentEnd: number
501 pendingWrap: boolean
502 hasRemoved: boolean
503 hasAdded: boolean
504 nextCellEmpty: boolean
505 nextCellKind?: 'visible-char' | 'styled-space' | 'spacer'
506}): void {
507 if (stats.nextRowContentEnd === 0) {
508 logUpdateRenderStats.totalNextRowContentEndZeroCalls += 1
509 if (stats.pendingWrap) {
510 logUpdateRenderStats.totalNextRowContentEndZeroPendingWrapCalls += 1
511 }
512 if (stats.hasRemoved && stats.hasAdded) {
513 logUpdateRenderStats.totalNextRowContentEndZeroRemovedAndAddedCalls += 1
514 } else if (stats.hasRemoved) {
515 logUpdateRenderStats.totalNextRowContentEndZeroRemovedOnlyCalls += 1
516 } else if (stats.hasAdded) {
517 logUpdateRenderStats.totalNextRowContentEndZeroAddedOnlyCalls += 1
518 }
519 if (stats.nextCellEmpty) {
520 logUpdateRenderStats.totalNextRowContentEndZeroEmptyTargetCalls += 1
521 } else {
522 logUpdateRenderStats.totalNextRowContentEndZeroNonEmptyTargetCalls += 1
523 if (stats.nextCellKind === 'visible-char') {
524 logUpdateRenderStats.totalNextRowContentEndZeroNonEmptyTargetVisibleCharCalls += 1
525 } else if (stats.nextCellKind === 'styled-space') {
526 logUpdateRenderStats.totalNextRowContentEndZeroNonEmptyTargetStyledSpaceCalls += 1
527 } else if (stats.nextCellKind === 'spacer') {
528 logUpdateRenderStats.totalNextRowContentEndZeroNonEmptyTargetSpacerCalls += 1
529 }
530 }
531 return
532 }
533
534 logUpdateRenderStats.totalNextRowContentEndPositiveCalls += 1
535}
536
537export function recordIncrementalTailClear(cells: number): void {
538 logUpdateRenderStats.totalIncrementalTailClearCalls += 1

Callers 1

renderMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected