mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-11-18 14:08:21 +00:00
useChatHelpers now builds the pane contract from a ChatHost the app supplies: its pane store, message query cache, turn builder, thread selection, abort transport and settings. The stop path lives in its own module, its spec runs in the package against a host with no app behind it, and the app mounts its host in Root beside the steer host.
9 lines
502 B
TypeScript
9 lines
502 B
TypeScript
import React from 'react';
|
|
import { ChatHostProvider } from '@librechat/chat/react';
|
|
import { appChatHost } from '~/Providers/ChatHostContext';
|
|
|
|
/** Mounts the app's chat host the way `routes/Root.tsx` does, for specs that render the chat
|
|
* hooks outside the app shell. Import it after the spec's module mocks so the host uses them. */
|
|
export function ChatHostTestProvider({ children }: { children?: React.ReactNode }) {
|
|
return <ChatHostProvider host={appChatHost}>{children}</ChatHostProvider>;
|
|
}
|