Skip to content

Commit bef3955

Browse files
committed
🤖 Fix auto-scroll when PinnedTodoList updates
Include todos in auto-scroll effect dependencies so scroll position adjusts when TODO list appears/changes, not just when messages update.
1 parent 0585010 commit bef3955

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/AIView.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,12 +345,12 @@ const AIViewInner: React.FC<AIViewProps> = ({
345345
void window.api.workspace.openTerminal(namedWorkspacePath);
346346
}, [namedWorkspacePath]);
347347

348-
// Auto-scroll when messages update (during streaming)
348+
// Auto-scroll when messages or todos update (during streaming)
349349
useEffect(() => {
350350
if (workspaceState && autoScroll) {
351351
performAutoScroll();
352352
}
353-
}, [workspaceState?.messages, autoScroll, performAutoScroll, workspaceState]);
353+
}, [workspaceState?.messages, workspaceState?.todos, autoScroll, performAutoScroll, workspaceState]);
354354

355355
// Scroll to bottom when workspace loads or changes
356356
useEffect(() => {

0 commit comments

Comments
 (0)