fix assistant streaming scroll lock
This commit is contained in:
1 parent
87a42f09be
commit
9f2b52dd7f
3 files changed
+7
-8
No files matched your search
@@ -22,6 +22,8 @@ While a response is running, a compact activity bar appears at the bottom of the
|
||||
avatar shows a thinking indicator. The activity bar can be opened to follow the response. Completed
|
||||
responses add an unread count to the user menu until they are opened or dismissed. The expanded
|
||||
conversation has a minimize action that returns it to the activity bar without interrupting a response.
|
||||
The transcript follows streamed output while it is already at the bottom, including fast responses. Scrolling
|
||||
up releases that follow state until **Scroll to latest** is selected or the user returns to the bottom.
|
||||
|
||||
`Shift + A` opens the compact conversation panel directly. The shortcut is ignored while typing in text
|
||||
fields, selectors, and editable content.
|
||||
|
||||
@@ -330,7 +330,6 @@
|
||||
flex: 1;
|
||||
flex-direction: column;
|
||||
overflow-y: auto;
|
||||
scroll-behavior: smooth;
|
||||
}
|
||||
|
||||
.messages {
|
||||
@@ -1313,8 +1312,4 @@
|
||||
animation: none;
|
||||
transition: none;
|
||||
}
|
||||
|
||||
.viewport {
|
||||
scroll-behavior: auto;
|
||||
}
|
||||
}
|
||||
@@ -53,7 +53,7 @@ import {
|
||||
UnstyledButton,
|
||||
useCombobox,
|
||||
} from "@mantine/core";
|
||||
import { useWindowEvent } from "@mantine/hooks";
|
||||
import { useReducedMotion, useWindowEvent } from "@mantine/hooks";
|
||||
import {
|
||||
IconActivityHeartbeat,
|
||||
IconAlertTriangle,
|
||||
@@ -2058,7 +2058,9 @@ export const AssistantConversationSurface = ({
|
||||
onMinimize,
|
||||
}: AssistantConversationSurfaceProps) => {
|
||||
const t = useScopedI18n("common.assistant");
|
||||
const reducedMotion = useReducedMotion();
|
||||
const [questionPortalTarget, setQuestionPortalTarget] = useState<HTMLDivElement | null>(null);
|
||||
const scrollToLatestBehavior = isRunning || reducedMotion ? "instant" : "smooth";
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -2122,7 +2124,7 @@ export const AssistantConversationSurface = ({
|
||||
</Group>
|
||||
<AssistantQuestionPortalProvider target={questionPortalTarget}>
|
||||
<ThreadPrimitive.Root className={classes.thread}>
|
||||
<ThreadPrimitive.Viewport className={classes.viewport}>
|
||||
<ThreadPrimitive.Viewport className={classes.viewport} autoScroll>
|
||||
<Box className={classes.messages}>
|
||||
<EmptyThread />
|
||||
<ThreadPrimitive.Messages components={{ UserMessage, AssistantMessage }} />
|
||||
@@ -2134,7 +2136,7 @@ export const AssistantConversationSurface = ({
|
||||
</Button>
|
||||
</SelectionToolbarPrimitive.Quote>
|
||||
</SelectionToolbarPrimitive.Root>
|
||||
<ThreadPrimitive.ScrollToBottom asChild>
|
||||
<ThreadPrimitive.ScrollToBottom behavior={scrollToLatestBehavior} asChild>
|
||||
<ActionIcon
|
||||
className={classes.scrollToBottom}
|
||||
variant="default"
|
||||
|
||||
Reference in new issue
Block a user