kimi-code icon indicating copy to clipboard operation
kimi-code copied to clipboard

[Bug] 任务触发子代理(subagent)执行期间,聊天窗口滚动条持续跳回底部,无法查阅历史消息

Open UoMaster opened this issue 4 months ago • 3 comments

Bug 描述

当 agent 执行任务触发子代理(subagent)运行时,聊天窗口的滚动条会持续被强制刷新到最底端。用户在子代理执行期间尝试向上滑动查看历史对话时,会被强制拉回底部,无法正常浏览历史内容。

复现步骤

  1. 在对话中发送一个会触发子代理的 prompt(例如需要搜索文件系统、执行复杂多步骤任务的请求)
  2. 子代理被触发并开始执行,聊天界面持续追加新的子代理输出消息
  3. 在子代理运行期间,尝试向上滚动查看之前的对话历史
  4. 滚动条会被强制弹回底部

期望行为

用户手动向上滑动查看历史内容时,不应被自动滚动打断。只有当用户已经处于底部(或接近底部)时,新消息才应该触发自动滚动到底部。如果用户正在浏览历史内容,新消息不应改变滚动位置。

环境信息

  • 平台:macOS

UoMaster avatar Jul 23 '26 07:07 UoMaster

the issue reproduce in win too

Heyu2002 avatar Jul 23 '26 07:07 Heyu2002

i see the source code. the reason is they adopt pi-tui’s scrollback and viewport incorrectly. for me its hard to fix it.

i have found a interesting pr is to fix the issue.

but unfortunatly it be rollback by the pr:

https://github.com/MoonshotAI/kimi-code/commit/23daf0f3c199b4aaa9bd9388a2903d7827f98d32

Heyu2002 avatar Jul 23 '26 09:07 Heyu2002

https://github.com/MoonshotAI/kimi-code/pull/2133 已经针对问题提交 pr

UoMaster avatar Jul 24 '26 04:07 UoMaster