|
|
@@ -1759,6 +1759,17 @@ function _Chat() {
|
|
|
)
|
|
|
}
|
|
|
|
|
|
+ useEffect(() => {
|
|
|
+ // 当显示欢迎页面时,确保滚动到顶部
|
|
|
+ if (messages.length <= 1 && scrollRef.current) {
|
|
|
+ setTimeout(() => {
|
|
|
+ if (scrollRef.current) {
|
|
|
+ scrollRef.current.scrollTo(0, 0);
|
|
|
+ }
|
|
|
+ }, 0);
|
|
|
+ }
|
|
|
+ }, [messages.length]);
|
|
|
+
|
|
|
return (
|
|
|
<div className={styles.chat} key={session.id}>
|
|
|
{
|
|
|
@@ -2182,7 +2193,6 @@ function _Chat() {
|
|
|
</>
|
|
|
}
|
|
|
</div>
|
|
|
-
|
|
|
<div className={styles["chat-input-panel"]}>
|
|
|
{/* <PromptHints prompts={promptHints} onPromptSelect={onPromptSelect} /> */}
|
|
|
<ChatActions
|