| ... | @@ -1284,7 +1284,6 @@ export default function ChatView({ threadId }: ChatViewProps) { | ... | @@ -1284,7 +1284,6 @@ export default function ChatView({ threadId }: ChatViewProps) { |
| 1284 | | 1284 | |
| 1285 | // Auto-scroll on new messages | 1285 | // Auto-scroll on new messages |
| 1286 | const messageCount = timelineMessages.length; | 1286 | const messageCount = timelineMessages.length; |
| 1287 | const workLogCount = workLogEntries.length; | | |
| 1288 | const scrollMessagesToBottom = useCallback((behavior: ScrollBehavior = "auto") => { | 1287 | const scrollMessagesToBottom = useCallback((behavior: ScrollBehavior = "auto") => { |
| 1289 | const scrollContainer = messagesScrollRef.current; | 1288 | const scrollContainer = messagesScrollRef.current; |
| 1290 | if (!scrollContainer) return; | 1289 | if (!scrollContainer) return; |
| ... | @@ -1354,11 +1353,6 @@ export default function ChatView({ threadId }: ChatViewProps) { | ... | @@ -1354,11 +1353,6 @@ export default function ChatView({ threadId }: ChatViewProps) { |
| 1354 | if (!shouldAutoScrollRef.current) return; | 1353 | if (!shouldAutoScrollRef.current) return; |
| 1355 | scheduleStickToBottom(); | 1354 | scheduleStickToBottom(); |
| 1356 | }, [messageCount, scheduleStickToBottom]); | 1355 | }, [messageCount, scheduleStickToBottom]); |
| 1357 | useEffect(() => { | | |
| 1358 | if (phase !== "running") return; | | |
| 1359 | if (!shouldAutoScrollRef.current) return; | | |
| 1360 | scheduleStickToBottom(); | | |
| 1361 | }, [phase, scheduleStickToBottom, workLogCount]); | | |
| 1362 | useEffect(() => { | 1356 | useEffect(() => { |
| 1363 | if (phase !== "running") return; | 1357 | if (phase !== "running") return; |
| 1364 | if (!shouldAutoScrollRef.current) return; | 1358 | if (!shouldAutoScrollRef.current) return; |