From bf46446d0e22f6fe0d3bc740dcf8c0243368adfc Mon Sep 17 00:00:00 2001 From: "xujingli.xjl" Date: Tue, 3 Sep 2024 17:57:06 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=9C=A8=E4=BC=9A=E8=AF=9D=E6=B6=88?= =?UTF-8?q?=E6=81=AF=E8=BF=94=E5=9B=9E=E8=BF=87=E7=A8=8B=E4=B8=AD=EF=BC=8C?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E6=89=8B=E5=8A=A8=E4=B8=8A=E6=BB=91=E5=90=8E?= =?UTF-8?q?=E5=85=B3=E9=97=AD=E8=87=AA=E5=8A=A8=E4=B8=8B=E6=BB=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web-apps/ui/src/views/chat/view.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/web-apps/ui/src/views/chat/view.tsx b/web-apps/ui/src/views/chat/view.tsx index 1dc3ee77..3cc05159 100644 --- a/web-apps/ui/src/views/chat/view.tsx +++ b/web-apps/ui/src/views/chat/view.tsx @@ -171,7 +171,13 @@ export class ChatView extends BaseView { id, agentId: this.agentId, }); - const toDispose = this.session.onMessage(() => setImmediate(this.scrollToBottom)); + const toDispose = this.session.onMessage(() => + setImmediate(() => { + if (!this.showToBottomBtn) { + this.scrollToBottom(); + } + }), + ); this.toDispose.push(toDispose); this.sessionDeferred.resolve(this.session); };