Skip to content

Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.

chore: remove assistant in the ui for now

Marc Seitz510448b38f54
diff --git a/components/documents/document-header.tsx b/components/documents/document-header.tsx
index d0935629..148b5565 100644
--- a/components/documents/document-header.tsx
+++ b/components/documents/document-header.tsx
@@ -23,6 +23,13 @@ import { useTheme } from "next-themes";
import { toast } from "sonner";
import { mutate } from "swr";
+import { getFile } from "@/lib/files/get-file";
+import { usePlan } from "@/lib/swr/use-billing";
+import useDatarooms from "@/lib/swr/use-datarooms";
+import { DocumentWithLinksAndLinkCountAndViewCount } from "@/lib/types";
+import { cn } from "@/lib/utils";
+import { fileIcon } from "@/lib/utils/get-file-icon";
+
import FileUp from "@/components/shared/icons/file-up";
import MoreVertical from "@/components/shared/icons/more-vertical";
import PapermarkSparkle from "@/components/shared/icons/papermark-sparkle";
@@ -37,13 +44,6 @@ import {
DropdownMenuTrigger,
} from "@/components/ui/dropdown-menu";
-import { getFile } from "@/lib/files/get-file";
-import { usePlan } from "@/lib/swr/use-billing";
-import useDatarooms from "@/lib/swr/use-datarooms";
-import { DocumentWithLinksAndLinkCountAndViewCount } from "@/lib/types";
-import { cn } from "@/lib/utils";
-import { fileIcon } from "@/lib/utils/get-file-icon";
-
import PlanBadge from "../billing/plan-badge";
import { UpgradePlanModal } from "../billing/upgrade-plan-modal";
import AdvancedSheet from "../shared/icons/advanced-sheet";
@@ -593,7 +593,8 @@ export default function DocumentHeader({
</AddDocumentModal>
)}
- {prismaDocument.type !== "notion" &&
+ {/* TODO: Assistant feature temporarily disabled. Will be re-enabled in a future update */}
+ {/* {prismaDocument.type !== "notion" &&
prismaDocument.type !== "sheet" &&
prismaDocument.type !== "zip" &&
prismaDocument.type !== "video" &&
@@ -608,7 +609,7 @@ export default function DocumentHeader({
>
<PapermarkSparkle className="h-5 w-5" />
</Button>
- )}
+ )} */}
<div className="flex items-center gap-x-1">
{actionRows.map((row, i) => (
@@ -661,7 +662,8 @@ export default function DocumentHeader({
</DropdownMenuItem>
)}
- {prismaDocument.type !== "notion" &&
+ {/* TODO: Assistant feature temporarily disabled. Will be re-enabled in a future update */}
+ {/* {prismaDocument.type !== "notion" &&
prismaDocument.type !== "sheet" &&
prismaDocument.type !== "zip" &&
primaryVersion.type !== "video" && (
@@ -688,7 +690,7 @@ export default function DocumentHeader({
Open AI Assistant
</DropdownMenuItem>
</>
- )}
+ )} */}
<DropdownMenuSeparator />
</DropdownMenuGroup>
diff --git a/pages/view/[linkId]/index.tsx b/pages/view/[linkId]/index.tsx
index d098c963..a16a39af 100644
--- a/pages/view/[linkId]/index.tsx
+++ b/pages/view/[linkId]/index.tsx
@@ -10,11 +10,6 @@ import { useSession } from "next-auth/react";
import { ExtendedRecordMap } from "notion-types";
import { parsePageId } from "notion-utils";
-import LoadingSpinner from "@/components/ui/loading-spinner";
-import CustomMetaTag from "@/components/view/custom-metatag";
-import DataroomView from "@/components/view/dataroom/dataroom-view";
-import DocumentView from "@/components/view/document-view";
-
import notion from "@/lib/notion";
import { addSignedUrls } from "@/lib/notion/utils";
import {
@@ -24,6 +19,11 @@ import {
NotionTheme,
} from "@/lib/types";
+import LoadingSpinner from "@/components/ui/loading-spinner";
+import CustomMetaTag from "@/components/view/custom-metatag";
+import DataroomView from "@/components/view/dataroom/dataroom-view";
+import DocumentView from "@/components/view/document-view";
+
type DocumentLinkData = {
linkType: "DOCUMENT_LINK";
link: LinkWithDocument;
@@ -112,6 +112,8 @@ export const getStaticProps = async (context: GetStaticPropsContext) => {
document: {
...linkDocument,
versions: [versionWithoutTypeAndFile],
+ // TODO: remove this once the assistant feature is re-enabled
+ assistantEnabled: false,
},
},
brand,
diff --git a/pages/view/domains/[domain]/[slug]/index.tsx b/pages/view/domains/[domain]/[slug]/index.tsx
index ce0da380..7f922956 100644
--- a/pages/view/domains/[domain]/[slug]/index.tsx
+++ b/pages/view/domains/[domain]/[slug]/index.tsx
@@ -10,11 +10,6 @@ import { useSession } from "next-auth/react";
import { ExtendedRecordMap } from "notion-types";
import { parsePageId } from "notion-utils";
-import LoadingSpinner from "@/components/ui/loading-spinner";
-import CustomMetaTag from "@/components/view/custom-metatag";
-import DataroomView from "@/components/view/dataroom/dataroom-view";
-import DocumentView from "@/components/view/document-view";
-
import notion from "@/lib/notion";
import {
CustomUser,
@@ -23,6 +18,11 @@ import {
NotionTheme,
} from "@/lib/types";
+import LoadingSpinner from "@/components/ui/loading-spinner";
+import CustomMetaTag from "@/components/view/custom-metatag";
+import DataroomView from "@/components/view/dataroom/dataroom-view";
+import DocumentView from "@/components/view/document-view";
+
type DocumentLinkData = {
linkType: "DOCUMENT_LINK";
link: LinkWithDocument;
@@ -93,6 +93,8 @@ export const getStaticProps = async (context: GetStaticPropsContext) => {
document: {
...linkDocument,
versions: [versionWithoutTypeAndFile],
+ // TODO: remove this once the assistant feature is re-enabled
+ assistantEnabled: false,
},
},
brand,