()
| 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) { |
no outgoing calls
no test coverage detected