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

Function shouldResetForResize

src/ink/log-update.ts:794–818  ·  view source on GitHub ↗
(prev: Frame, next: Frame)

Source from the content-addressed store, hash-verified

792}
793
794export function shouldResetForResize(prev: Frame, next: Frame): boolean {
795 if (prev.viewport.width !== 0 && next.viewport.width !== prev.viewport.width) {
796 if (canStayIncrementalAcrossWidthResize(prev, next)) {
797 return false
798 }
799 return true
800 }
801
802 if (next.viewport.height >= prev.viewport.height) {
803 return false
804 }
805
806 if (
807 prev.cursor.y >= next.viewport.height ||
808 next.cursor.y >= next.viewport.height
809 ) {
810 return true
811 }
812
813 if (prev.screen.height <= next.viewport.height) {
814 return false
815 }
816
817 return !canStayIncrementalAcrossHeightShrink(prev, next)
818}
819
820export function canRepaintFromPreviousOutputTop(frame: Frame): boolean {
821 return (

Callers 2

renderMethod · 0.85

Tested by

no test coverage detected