@@ -121,37 +121,35 @@ export const AgentRow: FC<AgentRowProps> = ({
121
121
} , [ agent . lifecycle_state , hasStartupFeatures ] ) ;
122
122
123
123
// This is a layout effect to remove flicker when we're scrolling to the bottom.
124
+ // biome-ignore lint/correctness/useExhaustiveDependencies: consider refactoring
124
125
useLayoutEffect ( ( ) => {
125
126
// If we're currently watching the bottom, we always want to stay at the bottom.
126
127
if ( bottomOfLogs && logListRef . current ) {
127
128
logListRef . current . scrollToItem ( startupLogs . length - 1 , "end" ) ;
128
129
}
129
- } , [ showLogs , startupLogs , logListRef , bottomOfLogs ] ) ;
130
+ } , [ showLogs , startupLogs , bottomOfLogs ] ) ;
130
131
131
132
// This is a bit of a hack on the react-window API to get the scroll position.
132
133
// If we're scrolled to the bottom, we want to keep the list scrolled to the bottom.
133
134
// This makes it feel similar to a terminal that auto-scrolls downwards!
134
- const handleLogScroll = useCallback (
135
- ( props : ListOnScrollProps ) => {
136
- if (
137
- props . scrollOffset === 0 ||
138
- props . scrollUpdateWasRequested ||
139
- ! logListDivRef . current
140
- ) {
141
- return ;
142
- }
143
- // The parent holds the height of the list!
144
- const parent = logListDivRef . current . parentElement ;
145
- if ( ! parent ) {
146
- return ;
147
- }
148
- const distanceFromBottom =
149
- logListDivRef . current . scrollHeight -
150
- ( props . scrollOffset + parent . clientHeight ) ;
151
- setBottomOfLogs ( distanceFromBottom < AGENT_LOG_LINE_HEIGHT ) ;
152
- } ,
153
- [ logListDivRef ] ,
154
- ) ;
135
+ const handleLogScroll = useCallback ( ( props : ListOnScrollProps ) => {
136
+ if (
137
+ props . scrollOffset === 0 ||
138
+ props . scrollUpdateWasRequested ||
139
+ ! logListDivRef . current
140
+ ) {
141
+ return ;
142
+ }
143
+ // The parent holds the height of the list!
144
+ const parent = logListDivRef . current . parentElement ;
145
+ if ( ! parent ) {
146
+ return ;
147
+ }
148
+ const distanceFromBottom =
149
+ logListDivRef . current . scrollHeight -
150
+ ( props . scrollOffset + parent . clientHeight ) ;
151
+ setBottomOfLogs ( distanceFromBottom < AGENT_LOG_LINE_HEIGHT ) ;
152
+ } , [ ] ) ;
155
153
156
154
return (
157
155
< Stack
0 commit comments