test: harden webui and gateway checks

This commit is contained in:
chengyongru
2026-06-27 11:04:11 +08:00
committed by Xubin Ren
parent 9ce9d2235a
commit 64901be67f
8 changed files with 360 additions and 3 deletions
@@ -26,6 +26,7 @@ import type { CliAppInfo, McpPresetInfo, UIMessage } from "@/lib/types";
export interface ThreadViewportHandle {
jumpToUserPrompt: (promptId: string) => void;
cancelAutoScroll: () => void;
}
interface ThreadViewportProps {
@@ -290,7 +291,14 @@ export const ThreadViewport = forwardRef<ThreadViewportHandle, ThreadViewportPro
setVisibleMessageCount((count) => Math.max(count, messages.length - index));
}, [messages]);
useImperativeHandle(ref, () => ({ jumpToUserPrompt }), [jumpToUserPrompt]);
useImperativeHandle(
ref,
() => ({
jumpToUserPrompt,
cancelAutoScroll: cancelScheduledBottomScroll,
}),
[cancelScheduledBottomScroll, jumpToUserPrompt],
);
const measureComposerDock = useCallback(() => {
const el = composerDockRef.current;