diff --git a/src/components/CourseAI/CourseAIPopover.tsx b/src/components/CourseAI/CourseAIPopover.tsx index 569b3dace..90c4f7fde 100644 --- a/src/components/CourseAI/CourseAIPopover.tsx +++ b/src/components/CourseAI/CourseAIPopover.tsx @@ -69,6 +69,7 @@ export function CourseAIPopover(props: CourseAIPopoverProps) { setMessage(''); }); + scrollToBottom(); completeCourseAIChat(newMessages); }; @@ -181,6 +182,10 @@ export function CourseAIPopover(props: CourseAIPopoverProps) { ); })} + {isLoading && !streamedMessage && ( + + )} + {streamedMessage && ( )} @@ -198,6 +203,7 @@ export function CourseAIPopover(props: CourseAIPopoverProps) { placeholder="Ask AI anything about the course..." value={message} onChange={(e) => setMessage(e.target.value)} + autoFocus={true} />