From 8ead6ebc0896ed39b2e86fe16b932ec0c0e44fdc Mon Sep 17 00:00:00 2001 From: JOJO <1498581755@qq.com> Date: Thu, 1 Jan 2026 17:37:55 +0800 Subject: [PATCH] fix: avoid auto re-locking scroll after tasks --- static/src/app.ts | 8 +++----- static/src/stores/chat.ts | 1 - 2 files changed, 3 insertions(+), 6 deletions(-) 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(); } }