From c0179d3309ce585fb1e11843d6802f570b2f6dd6 Mon Sep 17 00:00:00 2001 From: l0ng-ai <24760907+l0ng-ai@users.noreply.github.com> Date: Wed, 28 Oct 2026 09:48:26 +0800 Subject: [PATCH] feat(agents): Drop Jump to Bottom from the conversation --- src/features/agents/Session.module.css | 12 +----------- src/features/agents/SessionEditor.tsx | 17 ----------------- src/platform/locales/text/zh.json | 1 - 3 files changed, 1 insertion(+), 29 deletions(-) diff --git a/src/features/agents/Session.module.css b/src/features/agents/Session.module.css index db8f63a0d..98a628aa8 100644 --- a/src/features/agents/Session.module.css +++ b/src/features/agents/Session.module.css @@ -96,7 +96,7 @@ cursor: default; } -/* The conversation plus what floats over it (find bar, Jump to Bottom). */ +/* The conversation with its find bar. */ .streamArea { position: relative; flex: 1; @@ -157,16 +157,6 @@ pointer-events: auto; } -.jumpToBottom { - position: absolute; - right: 16px; - bottom: 12px; - background: var(--bg-popup); - border: 1px solid var(--border); - border-radius: 50%; - box-shadow: var(--shadow-tooltip); -} - .findBar { flex: none; display: flex; diff --git a/src/features/agents/SessionEditor.tsx b/src/features/agents/SessionEditor.tsx index d7fe4cac6..cb284eb45 100644 --- a/src/features/agents/SessionEditor.tsx +++ b/src/features/agents/SessionEditor.tsx @@ -164,22 +164,14 @@ interface StreamProps { } function Stream({ task, entries, finding, findFocus, onCloseFind }: StreamProps) { - const tx = useTx(); const ref = useRef(null); const stick = useRef(true); - const [atBottom, setAtBottom] = useState(true); useLayoutEffect(() => { const el = ref.current; if (el && stick.current) el.scrollTop = el.scrollHeight; }); const waiting = entries?.some((e) => e.type === "permission" && !e.chosen); const lastUser = entries?.findLast((e): e is UserEntry => e.type === "user"); - const toBottom = () => { - const el = ref.current; - if (!el) return; - stick.current = true; - el.scrollTo({ top: el.scrollHeight, behavior: "smooth" }); - }; return (
{finding && } @@ -191,7 +183,6 @@ function Stream({ task, entries, finding, findFocus, onCloseFind }: StreamProps) onScroll={(e) => { const el = e.currentTarget; stick.current = el.scrollHeight - el.scrollTop - el.clientHeight < 40; - setAtBottom(stick.current); }} // Copy, plus Quote for a selection: replies to it in the composer. onContextMenu={(e) => { @@ -218,14 +209,6 @@ function Stream({ task, entries, finding, findFocus, onCloseFind }: StreamProps)
)} - {!atBottom && ( - - )} ); } diff --git a/src/platform/locales/text/zh.json b/src/platform/locales/text/zh.json index 0563c0033..df19d1259 100644 --- a/src/platform/locales/text/zh.json +++ b/src/platform/locales/text/zh.json @@ -4192,7 +4192,6 @@ "Cannot load agent tasks": "无法加载智能体任务", "Opening {name}…": "正在打开 {name}…", "Copy Code": "复制代码", - "Jump to Bottom": "跳到底部", "Quote": "引用", "Find in Conversation": "在对话中查找", "Find in conversation": "在对话中查找",