Skip to content

Commit fae36e2

Browse files
committed
wrap chat collection view shell with chat message provider
1 parent 2c2a0c7 commit fae36e2

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/BrainDriveChatWithDocs.tsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React from 'react';
22
import './BrainDriveChatWithDocs.css';
33
import { Loader2, AlertCircle } from 'lucide-react';
4+
import { ChatMessagesProvider } from './collection-chat-view/context/chat-messages-provider';
45
import { CollectionViewShell } from './collection-view/CollectionViewShell';
56
import { CollectionChatViewShell } from './collection-chat-view/CollectionChatViewShell';
67
import {
@@ -176,11 +177,13 @@ class BrainDriveChatWithDocs extends React.Component<ChatCollectionsPluginProps,
176177
/>
177178
)}
178179
{currentView === ViewType.CHAT && selectedCollection && (
179-
<CollectionChatViewShell
180-
services={services}
181-
dataRepository={this.pluginService.getDataRepository()}
182-
selectedCollection={selectedCollection}
183-
/>
180+
<ChatMessagesProvider>
181+
<CollectionChatViewShell
182+
services={services}
183+
dataRepository={this.pluginService.getDataRepository()}
184+
selectedCollection={selectedCollection}
185+
/>
186+
</ChatMessagesProvider>
184187
)}
185188
{currentView === ViewType.SETTINGS && (
186189
<ChatCollectionsSettings services={services} />

0 commit comments

Comments
 (0)