From c6207970ee6cc6c416f30ad676cb960dccf46c7b Mon Sep 17 00:00:00 2001 From: Red Adaya Date: Wed, 8 May 2024 07:30:38 +0800 Subject: [PATCH] save work --- src/app/sidebar/aichat.tsx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/app/sidebar/aichat.tsx b/src/app/sidebar/aichat.tsx index 19173158..2891742e 100644 --- a/src/app/sidebar/aichat.tsx +++ b/src/app/sidebar/aichat.tsx @@ -66,10 +66,10 @@ class ChatContent extends React.Component<{ chatWindowRef }, {}> { const { viewport, scrollOffsetElement } = this.osInstance.elements(); const { scrollTop } = scrollOffsetElement; console.log("this.props.chatWindowRef.current.scrollTop", scrollTop); - // viewport.scrollTo({ - // behavior: "auto", - // top: this.props.chatWindowRef.current.scrollHeight, - // }); + viewport.scrollTo({ + behavior: "auto", + top: this.props.chatWindowRef.current.scrollHeight, + }); } } @@ -86,10 +86,10 @@ class ChatContent extends React.Component<{ chatWindowRef }, {}> { GlobalModel.inputModel.setChatOsInstance(instance); this.osInstance = instance; const { viewport } = instance.elements(); - // viewport.scrollTo({ - // behavior: "auto", - // top: this.props.chatWindowRef.current.scrollHeight, - // }); + viewport.scrollTo({ + behavior: "auto", + top: this.props.chatWindowRef.current.scrollHeight, + }); } renderError(err: string): any {