diff --git a/bundlesize.config.json b/bundlesize.config.json index 726cda7f05e..1da135b564f 100644 --- a/bundlesize.config.json +++ b/bundlesize.config.json @@ -22,7 +22,7 @@ }, { "path": "packages/react-instantsearch/dist/umd/ReactInstantSearch.min.js", - "maxSize": "81.25 kB" + "maxSize": "81.50 kB" }, { "path": "packages/vue-instantsearch/vue2/umd/index.js", diff --git a/packages/react-instantsearch/src/ui/lib/useStickToBottom.ts b/packages/react-instantsearch/src/ui/lib/useStickToBottom.ts index 13b0f273c38..f29ff512a51 100644 --- a/packages/react-instantsearch/src/ui/lib/useStickToBottom.ts +++ b/packages/react-instantsearch/src/ui/lib/useStickToBottom.ts @@ -607,7 +607,6 @@ function useRefCallback any>( callback: T, deps: DependencyList ) { - // biome-ignore lint/correctness/useExhaustiveDependencies: not needed const result = useCallback((ref: HTMLElement | null) => { result.current = ref; return callback(ref); diff --git a/packages/react-instantsearch/src/widgets/Chat.tsx b/packages/react-instantsearch/src/widgets/Chat.tsx index 839f893bb08..ce449d547e5 100644 --- a/packages/react-instantsearch/src/widgets/Chat.tsx +++ b/packages/react-instantsearch/src/widgets/Chat.tsx @@ -12,6 +12,7 @@ import type { RecommendComponentProps, RecordWithObjectID, ChatToolMessage, + MutableRef, } from 'instantsearch-ui-components'; import type { UIMessage } from 'instantsearch.js/es/lib/chat'; import type { UseChatOptions } from 'react-instantsearch-core'; @@ -93,7 +94,12 @@ type UserHeaderProps = Omit; type UserMessagesProps = Omit< ChatUiProps['messagesProps'], - 'messages' | 'tools' | 'indexUiState' | 'setIndexUiState' + | 'messages' + | 'tools' + | 'indexUiState' + | 'setIndexUiState' + | 'scrollRef' + | 'contentRef' >; type UserPromptProps = Omit< @@ -201,8 +207,8 @@ export function Chat({ setIndexUiState, isClearing, onClearTransitionEnd: handleClearTransitionEnd, - scrollRef: { current: scrollRef.current as HTMLDivElement }, - contentRef: { current: contentRef.current as HTMLDivElement }, + scrollRef: scrollRef as unknown as MutableRef, + contentRef: contentRef as unknown as MutableRef, isScrollAtBottom: isAtBottom, onScrollToBottom: scrollToBottom, ...messagesProps,