MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / checkOverflow

Function checkOverflow

cli/src/hooks/use-chat-ui.ts:76–85  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

74 if (!scrollbox) return
75
76 const checkOverflow = () => {
77 const contentHeight = scrollbox.scrollHeight
78 const viewportHeight = scrollbox.viewport.height
79 const isOverflowing = contentHeight > viewportHeight
80
81 if (hasOverflowRef.current !== isOverflowing) {
82 hasOverflowRef.current = isOverflowing
83 setHasOverflow(isOverflowing)
84 }
85 }
86
87 checkOverflow()
88 scrollbox.verticalScrollBar.on('change', checkOverflow)

Callers 1

useChatUIFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected