输入框状态剥离,避免受长信息列表渲染影响;覆写滚动条状态动作,不再强制拉到最底

This commit is contained in:
2026-06-03 15:01:24 +08:00
parent 888132a60f
commit fa3e6b6e84
3 changed files with 90 additions and 47 deletions
+6
View File
@@ -23,6 +23,8 @@ type AgentWorkspaceProps = {
branchGroups: BranchGroup[];
branchTransition: BranchTransition | null;
isStreaming: boolean;
scrollContainerRef: React.RefObject<HTMLDivElement | null>;
onScroll: React.UIEventHandler<HTMLDivElement>;
bottomRef: React.RefObject<HTMLDivElement | null>;
speakingMessageId: string | null;
speechState: SpeechState;
@@ -155,6 +157,8 @@ export const AgentWorkspace = ({
branchGroups,
branchTransition,
isStreaming,
scrollContainerRef,
onScroll,
bottomRef,
speakingMessageId,
speechState,
@@ -216,6 +220,8 @@ export const AgentWorkspace = ({
return (
<Box
ref={scrollContainerRef}
onScroll={onScroll}
sx={{
flex: 1,
overflowY: "auto",