Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore dropzone container #8984

Merged
merged 1 commit into from
Nov 28, 2024
Merged
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
72 changes: 39 additions & 33 deletions extension/app/src/pages/ConversationPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { ConversationContainer } from "@extension/components/conversation/Conver
import { ConversationsListButton } from "@extension/components/conversation/ConversationsListButton";
import { FileDropProvider } from "@extension/components/conversation/FileUploaderContext";
import { usePublicConversation } from "@extension/components/conversation/usePublicConversation";
import { DropzoneContainer } from "@extension/components/DropzoneContainer";
import { InputBarProvider } from "@extension/components/input_bar/InputBarContext";
import { useNavigate, useParams } from "react-router-dom";

Expand All @@ -34,43 +35,48 @@ export const ConversationPage = ({

return (
<FileDropProvider>
<BarHeader
title={title}
tooltip={title}
leftActions={
<Button
icon={ChevronLeftIcon}
variant="ghost"
onClick={() => {
navigate("/");
}}
size="md"
/>
}
rightActions={
<div className="flex flex-row items-right">
<ConversationsListButton size="md" />

<DropzoneContainer
description="Drag and drop your text files (txt, doc, pdf) and image files (jpg, png) here."
title="Attach files to the conversation"
>
<BarHeader
title={title}
tooltip={title}
leftActions={
<Button
icon={ExternalLinkIcon}
icon={ChevronLeftIcon}
variant="ghost"
href={`${process.env.DUST_DOMAIN}/w/${workspace.sId}/assistant/${conversationId}`}
target="_blank"
onClick={() => {
navigate("/");
}}
size="md"
tooltip="Open in Dust"
/>
</div>
}
/>
<div className="h-full w-full pt-4 mt-12">
<InputBarProvider>
<ConversationContainer
owner={workspace}
conversationId={conversationId}
user={user}
/>
</InputBarProvider>
</div>
}
rightActions={
<div className="flex flex-row items-right">
<ConversationsListButton size="md" />

<Button
icon={ExternalLinkIcon}
variant="ghost"
href={`${process.env.DUST_DOMAIN}/w/${workspace.sId}/assistant/${conversationId}`}
target="_blank"
size="md"
tooltip="Open in Dust"
/>
</div>
}
/>
<div className="h-full w-full pt-4 mt-12">
<InputBarProvider>
<ConversationContainer
owner={workspace}
conversationId={conversationId}
user={user}
/>
</InputBarProvider>
</div>
</DropzoneContainer>
</FileDropProvider>
);
};