输入框状态剥离,避免受长信息列表渲染影响;覆写滚动条状态动作,不再强制拉到最底
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user