Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bundlesize.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,6 @@ function useRefCallback<T extends (ref: HTMLElement | null) => any>(
callback: T,
deps: DependencyList
) {
// biome-ignore lint/correctness/useExhaustiveDependencies: not needed
const result = useCallback((ref: HTMLElement | null) => {
result.current = ref;
return callback(ref);
Expand Down
12 changes: 9 additions & 3 deletions packages/react-instantsearch/src/widgets/Chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -93,7 +94,12 @@ type UserHeaderProps = Omit<ChatUiProps['headerProps'], 'onClose'>;

type UserMessagesProps = Omit<
ChatUiProps['messagesProps'],
'messages' | 'tools' | 'indexUiState' | 'setIndexUiState'
| 'messages'
| 'tools'
| 'indexUiState'
| 'setIndexUiState'
| 'scrollRef'
| 'contentRef'
>;

type UserPromptProps = Omit<
Expand Down Expand Up @@ -201,8 +207,8 @@ export function Chat<TObject extends RecordWithObjectID>({
setIndexUiState,
isClearing,
onClearTransitionEnd: handleClearTransitionEnd,
scrollRef: { current: scrollRef.current as HTMLDivElement },
contentRef: { current: contentRef.current as HTMLDivElement },
scrollRef: scrollRef as unknown as MutableRef<HTMLDivElement>,
contentRef: contentRef as unknown as MutableRef<HTMLDivElement>,
isScrollAtBottom: isAtBottom,
onScrollToBottom: scrollToBottom,
...messagesProps,
Expand Down