@hivegpt/hiveai-angular 0.0.607 → 0.0.608
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/components/chat-drawer/chat-drawer.component.mjs +7 -5
- package/fesm2015/hivegpt-hiveai-angular.mjs +7 -4
- package/fesm2015/hivegpt-hiveai-angular.mjs.map +1 -1
- package/fesm2020/hivegpt-hiveai-angular.mjs +6 -4
- package/fesm2020/hivegpt-hiveai-angular.mjs.map +1 -1
- package/lib/components/chat-drawer/chat-drawer.component.d.ts +1 -1
- package/lib/components/chat-drawer/chat-drawer.component.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -3658,10 +3658,13 @@ class ChatDrawerComponent {
|
|
|
3658
3658
|
}
|
|
3659
3659
|
this.cdr.detectChanges();
|
|
3660
3660
|
}
|
|
3661
|
-
scrollToBottom() {
|
|
3662
|
-
|
|
3661
|
+
scrollToBottom(force = false) {
|
|
3662
|
+
var _a;
|
|
3663
|
+
if (!force && !this.autoScrollOnNewMessage) {
|
|
3663
3664
|
return;
|
|
3664
3665
|
}
|
|
3666
|
+
if (!((_a = this.chatMain) === null || _a === void 0 ? void 0 : _a.nativeElement))
|
|
3667
|
+
return;
|
|
3665
3668
|
let counter = 0;
|
|
3666
3669
|
const interval = setInterval(() => {
|
|
3667
3670
|
this.chatMain.nativeElement.scrollTop =
|
|
@@ -3673,7 +3676,7 @@ class ChatDrawerComponent {
|
|
|
3673
3676
|
/** Scrolls the chat container so the top of the AI message with the given id is visible. */
|
|
3674
3677
|
scrollToAiMessage(messageId) {
|
|
3675
3678
|
var _a;
|
|
3676
|
-
if (!
|
|
3679
|
+
if (!((_a = this.chatMain) === null || _a === void 0 ? void 0 : _a.nativeElement))
|
|
3677
3680
|
return;
|
|
3678
3681
|
const container = this.chatMain.nativeElement;
|
|
3679
3682
|
const el = container.querySelector(`[data-msg-id="${messageId}"]`);
|
|
@@ -4564,8 +4567,8 @@ class ChatDrawerComponent {
|
|
|
4564
4567
|
setTimeout(() => this.scrollToAiMessage(messageId), 30);
|
|
4565
4568
|
}
|
|
4566
4569
|
else {
|
|
4567
|
-
this.scrollToBottom();
|
|
4568
4570
|
this.cdr.markForCheck();
|
|
4571
|
+
setTimeout(() => this.scrollToBottom(true), 0);
|
|
4569
4572
|
}
|
|
4570
4573
|
break;
|
|
4571
4574
|
}
|