Skip to content

Commit

Permalink
fix(assistant-builder): hidden sidebar after 'launch in chat' click (#71
Browse files Browse the repository at this point in the history
)

Signed-off-by: Petr Kadlec <[email protected]>
  • Loading branch information
kapetr authored Nov 13, 2024
1 parent a8e82a9 commit f2d35f4
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions src/app/(main)/[projectId]/chat/[assistantId]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import { ChatHomeView } from '@/modules/chat/ChatHomeView';
import { ChatProvider } from '@/modules/chat/providers/ChatProvider';
import { FilesUploadProvider } from '@/modules/chat/providers/FilesUploadProvider';
import { VectorStoreFilesUploadProvider } from '@/modules/knowledge/files/VectorStoreFilesUploadProvider';
import { LayoutInitializer } from '@/store/layout/LayouInitializer';
import { handleApiError } from '@/utils/handleApiError';
import { notFound } from 'next/navigation';

Expand Down Expand Up @@ -55,16 +56,19 @@ export default async function AssistantChatPage({
if (!assistantResult) notFound();

return (
<VectorStoreFilesUploadProvider projectId={projectId}>
<FilesUploadProvider>
<ChatProvider
threadAssistant={{
data: decodeEntityWithMetadata<Assistant>(assistantResult) ?? null,
}}
>
<ChatHomeView />
</ChatProvider>
</FilesUploadProvider>
</VectorStoreFilesUploadProvider>
<LayoutInitializer layout={{ sidebarVisible: true }}>
<VectorStoreFilesUploadProvider projectId={projectId}>
<FilesUploadProvider>
<ChatProvider
threadAssistant={{
data:
decodeEntityWithMetadata<Assistant>(assistantResult) ?? null,
}}
>
<ChatHomeView />
</ChatProvider>
</FilesUploadProvider>
</VectorStoreFilesUploadProvider>
</LayoutInitializer>
);
}

0 comments on commit f2d35f4

Please sign in to comment.