diff --git a/client/src/components/Chat/Presentation.test.tsx b/client/src/components/Chat/Presentation.test.tsx index 513f1d8aa61..a26c6852e5e 100644 --- a/client/src/components/Chat/Presentation.test.tsx +++ b/client/src/components/Chat/Presentation.test.tsx @@ -12,6 +12,7 @@ import { sideChatAvailableAtom, } from '@librechat/chat/react'; import type { TConversation, TStartupConfig } from 'librechat-data-provider'; +import type { SideChat } from '@librechat/chat/react'; import type { JotaiStore } from 'test/harness'; import type { Artifact } from '~/common'; import { prepareUndockedDocument } from '~/components/Artifacts/undockedWindow'; @@ -39,6 +40,11 @@ const mockOpenChildLabel = 'Open Child Activity'; const mockSideChatLabel = 'Side chat loaded'; const mockOpenSideChatLabel = 'Open Side Chat'; const mockAskSideChatLabel = 'Ask for a side chat'; +let mockSideChatProps: { + chat: SideChat; + onClose: () => void; + onHandedTextTaken: (expected: SideChat) => void; +}; const mockSelectAgentConversationLabel = 'Select Agent Conversation'; const mockStartAgentRunLabel = 'Start Agent Run'; /** @@ -86,7 +92,8 @@ jest.mock('@librechat/chat/components', () => { ), loadSideChatPanel: () => Promise.resolve({ - default: function MockSideChatPanel() { + default: function MockSideChatPanel(props: typeof mockSideChatProps) { + mockSideChatProps = props; const parent = useParentSubagents(); return (