diff --git a/src/features/chat/ui/AgentWorkPanel.tsx b/src/features/chat/ui/AgentWorkPanel.tsx index 50feea638..02753e708 100644 --- a/src/features/chat/ui/AgentWorkPanel.tsx +++ b/src/features/chat/ui/AgentWorkPanel.tsx @@ -27,6 +27,7 @@ import type { ToolCallStatus, } from "@/shared/types/messages"; import type { TranscriptAgentWorkPayload } from "@/features/chat/transcript/projection/transcriptItemTypes"; +import { useTranscriptRowStateAdapter } from "@/features/chat/transcript/row-state"; import { ToolCallAdapter } from "./ToolCallAdapter"; interface ToolTimelineItem { @@ -351,6 +352,7 @@ export function AgentWorkPanel({ }) { const { t } = useTranslation("chat"); const prefersReducedMotion = useReducedMotion(); + const { markRowInteracted, pinScrollAnchor } = useTranscriptRowStateAdapter(); const items = useMemo( () => buildAgentWorkTimeline(payload.content), [payload.content], @@ -423,7 +425,12 @@ export function AgentWorkPanel({ return ( { + markRowInteracted("agent-work-disclosure"); + pinScrollAnchor(); + setOpen(nextOpen); + }} + data-role="agent-work-panel" className="mt-3 w-full min-w-0 max-w-full" >
@@ -484,7 +491,11 @@ export function AgentWorkPanel({ > { + markRowInteracted("agent-work-previous-steps"); + pinScrollAnchor(); + setPreviousStepsOpen(nextOpen); + }} >