fix(web): 回答从开头开始读,两个会话面同一套钉顶跟随
This commit is contained in:
@@ -464,8 +464,7 @@ export function RectificationAgenticChat(props: RectificationAgenticChatProps) {
|
||||
const boardId = useId();
|
||||
const boardTitleId = useId();
|
||||
const composerRemainingId = useId();
|
||||
// The same anchor-and-follow the consultation surface uses: streamed tokens and
|
||||
// new cards land the viewport on the bottom only while the reader is there.
|
||||
// Same pin-the-turn-head hook as the consultation surface (BUG-930).
|
||||
const conversationAnchor = useConversationScrollAnchor(conversation, true, caseId);
|
||||
|
||||
useLayoutEffect(() => {
|
||||
@@ -717,6 +716,7 @@ export function RectificationAgenticChat(props: RectificationAgenticChatProps) {
|
||||
: []),
|
||||
liveRow,
|
||||
]));
|
||||
if (!continuation) conversationAnchor.pinLatestTurn();
|
||||
let raw = "";
|
||||
let runOutcome: "succeeded" | "stopped" | "failed" = "failed";
|
||||
let activityTrace: readonly AgentActivityTraceItem[] = emptyActivityTrace();
|
||||
@@ -1079,6 +1079,7 @@ export function RectificationAgenticChat(props: RectificationAgenticChatProps) {
|
||||
},
|
||||
},
|
||||
]);
|
||||
conversationAnchor.pinLatestTurn();
|
||||
setPending(true);
|
||||
const abortController = new AbortController();
|
||||
runAbort.current = abortController;
|
||||
@@ -1231,6 +1232,7 @@ export function RectificationAgenticChat(props: RectificationAgenticChatProps) {
|
||||
activity: { phase: "evidence-validation", label: adoptingLabel, startedAt: Date.now() },
|
||||
},
|
||||
]);
|
||||
conversationAnchor.pinLatestTurn();
|
||||
const abortController = new AbortController();
|
||||
runAbort.current = abortController;
|
||||
try {
|
||||
@@ -1812,7 +1814,7 @@ export function RectificationAgenticChat(props: RectificationAgenticChatProps) {
|
||||
</section>
|
||||
|
||||
<div className="composer-wrap">
|
||||
{!conversationAnchor.anchored && (
|
||||
{conversationAnchor.latestBelowFold && (
|
||||
<JumpToLatestButton onClick={conversationAnchor.anchorToLatest} />
|
||||
)}
|
||||
<ChatComposer
|
||||
|
||||
Reference in New Issue
Block a user