import { Index, type Accessor } from "solid-js" import VirtualItem from "./virtual-item" import MessageBlock from "./message-block" import type { InstanceMessageStore } from "../stores/message-v2/instance-store" export function getMessageAnchorId(messageId: string) { return `message-anchor-${messageId}` } const VIRTUAL_ITEM_MARGIN_PX = 800 interface MessageBlockListProps { instanceId: string sessionId: string store: () => InstanceMessageStore messageIds: () => string[] lastAssistantIndex: () => number showThinking: () => boolean thinkingDefaultExpanded: () => boolean showUsageMetrics: () => boolean scrollContainer: Accessor loading?: boolean onRevert?: (messageId: string) => void onFork?: (messageId?: string) => void onContentRendered?: () => void setBottomSentinel: (element: HTMLDivElement | null) => void suspendMeasurements?: () => boolean } export default function MessageBlockList(props: MessageBlockListProps) { return ( <> {(messageId, index) => ( !props.loading} suspendMeasurements={props.suspendMeasurements} > )}