From 53960e3ac38af89b88aae1831578aae3123193ce Mon Sep 17 00:00:00 2001 From: Jonathan Lim-Breitbart Date: Fri, 6 Jun 2025 09:50:03 -0700 Subject: [PATCH 1/4] feat(AIChat): constrain chat box height --- .../aiChat/ai-chat-show-work/ai-chat-show-work.component.html | 1 + .../aiChat/ai-chat-student/ai-chat-student.component.html | 1 + .../aiChat/ai-chat-student/ai-chat-student.component.scss | 2 ++ 3 files changed, 4 insertions(+) diff --git a/src/assets/wise5/components/aiChat/ai-chat-show-work/ai-chat-show-work.component.html b/src/assets/wise5/components/aiChat/ai-chat-show-work/ai-chat-show-work.component.html index 48d5aeee7fe..b567926528f 100644 --- a/src/assets/wise5/components/aiChat/ai-chat-show-work/ai-chat-show-work.component.html +++ b/src/assets/wise5/components/aiChat/ai-chat-show-work/ai-chat-show-work.component.html @@ -1,5 +1,6 @@
Date: Fri, 6 Jun 2025 11:02:52 -0700 Subject: [PATCH 2/4] Scroll to bottom after each message --- .../ai-chat-student.component.html | 15 ++++++++------- .../ai-chat-student.component.scss | 3 +-- .../ai-chat-student/ai-chat-student.component.ts | 14 +++++++++++++- 3 files changed, 22 insertions(+), 10 deletions(-) diff --git a/src/assets/wise5/components/aiChat/ai-chat-student/ai-chat-student.component.html b/src/assets/wise5/components/aiChat/ai-chat-student/ai-chat-student.component.html index 519c6644073..92a8811b7b6 100644 --- a/src/assets/wise5/components/aiChat/ai-chat-student/ai-chat-student.component.html +++ b/src/assets/wise5/components/aiChat/ai-chat-student/ai-chat-student.component.html @@ -5,13 +5,14 @@ /> - +
+ +
void; + + scrollToBottom(): void { + setTimeout(() => { + this.messagesContainer.nativeElement.scroll({ + top: this.messagesContainer.nativeElement.scrollHeight, + behavior: 'smooth' + }); + }, 100); + } } applyMixins(AiChatStudentComponent, [ComputerAvatarInitializer]); From e047f4a5cfd91a4d3b77dedb9ee2e9bc351e4d46 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 6 Jun 2025 18:11:25 +0000 Subject: [PATCH 3/4] Updated messages --- src/messages.xlf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/messages.xlf b/src/messages.xlf index fcbc00f3a43..2b43fa1cbe7 100644 --- a/src/messages.xlf +++ b/src/messages.xlf @@ -15880,7 +15880,7 @@ Are you sure you want to proceed? An error occurred. src/assets/wise5/components/aiChat/ai-chat-student/ai-chat-student.component.ts - 101 + 104 From 4fb466f3e4b28bae418a52d952b6ead0c6c766cc Mon Sep 17 00:00:00 2001 From: Hiroki Terashima Date: Fri, 6 Jun 2025 12:53:49 -0700 Subject: [PATCH 4/4] minor fixes --- .../aiChat/ai-chat-show-work/ai-chat-show-work.component.html | 2 +- .../aiChat/ai-chat-student/ai-chat-student.component.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/assets/wise5/components/aiChat/ai-chat-show-work/ai-chat-show-work.component.html b/src/assets/wise5/components/aiChat/ai-chat-show-work/ai-chat-show-work.component.html index b567926528f..98755d5e900 100644 --- a/src/assets/wise5/components/aiChat/ai-chat-show-work/ai-chat-show-work.component.html +++ b/src/assets/wise5/components/aiChat/ai-chat-show-work/ai-chat-show-work.component.html @@ -1,6 +1,6 @@
void; - scrollToBottom(): void { + private scrollToBottom(): void { setTimeout(() => { this.messagesContainer.nativeElement.scroll({ top: this.messagesContainer.nativeElement.scrollHeight,