MCPcopy Create free account
hub / github.com/winfunc/opcode / isAtBottom

Function isAtBottom

src/components/SessionOutputViewer.tsx:58–66  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

56
57 // Auto-scroll logic similar to AgentExecution
58 const isAtBottom = () => {
59 const container = isFullscreen ? fullscreenScrollRef.current : scrollAreaRef.current;
60 if (container) {
61 const { scrollTop, scrollHeight, clientHeight } = container;
62 const distanceFromBottom = scrollHeight - scrollTop - clientHeight;
63 return distanceFromBottom < 1;
64 }
65 return true;
66 };
67
68 const scrollToBottom = () => {
69 if (!hasUserScrolled) {

Callers 1

SessionOutputViewerFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected