diff --git a/static/src/app.ts b/static/src/app.ts index 6f662d7..6220354 100644 --- a/static/src/app.ts +++ b/static/src/app.ts @@ -1228,9 +1228,6 @@ const appOptions = { } }); - // 重置滚动状态 - this.chatEnableAutoScroll(); - // 清理Markdown缓存 if (this.markdownCache) { this.markdownCache.clear(); @@ -2219,8 +2216,9 @@ const appOptions = { this.inputClearMessage(); this.inputSetLineCount(1); this.inputSetMultiline(false); - this.chatEnableAutoScroll(); - this.scrollToBottom(); + if (this.autoScrollEnabled) { + this.scrollToBottom(); + } this.autoResizeInput(); // 发送消息后延迟更新当前上下文Token(关键修复:恢复原逻辑) diff --git a/static/src/stores/chat.ts b/static/src/stores/chat.ts index 792aeb1..fe7833a 100644 --- a/static/src/stores/chat.ts +++ b/static/src/stores/chat.ts @@ -329,7 +329,6 @@ export const useChatStore = defineStore('chat', { this.currentMessageIndex = -1; this.streamingMessage = false; this.clearExpandedBlocks(); - this.enableAutoScroll(); this.clearThinkingLocks(); } }