From 7685f22638406d7a8535b9ff80a6050676851ae7 Mon Sep 17 00:00:00 2001 From: Raymond Weitekamp <19483938+rawwerks@users.noreply.github.com> Date: Tue, 26 Nov 2024 13:32:46 -0500 Subject: [PATCH 1/2] serverActions are available now MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Invalid next.config.js options detected: ⚠ Expected object, received boolean at "experimental.serverActions" ⚠ See more info here: https://nextjs.org/docs/messages/invalid-next-config ⚠ Server Actions are available by default now, `experimental.serverActions` option can be safely removed. https://nextjs.org/docs/messages/invalid-next-config --- .gitignore | 1 + next.config.js | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 8786491..a35c7d9 100644 --- a/.gitignore +++ b/.gitignore @@ -50,3 +50,4 @@ workspace.json aichat.data.json composer_data.json +bun.lockb diff --git a/next.config.js b/next.config.js index b4e2f03..9a6d7d7 100644 --- a/next.config.js +++ b/next.config.js @@ -1,8 +1,8 @@ /** @type {import('next').NextConfig} */ const nextConfig = { - experimental: { - serverActions: true, - }, + // experimental: { + // serverActions: true, + // }, } module.exports = nextConfig \ No newline at end of file From 86933ae41c4b940640da54f2570a1a38aa5a5456 Mon Sep 17 00:00:00 2001 From: Raymond Weitekamp <19483938+rawwerks@users.noreply.github.com> Date: Tue, 26 Nov 2024 13:45:31 -0500 Subject: [PATCH 2/2] add download-all button the new cursor composer agent wrote 100% of this code. --- package.json | 1 + src/components/download-all-menu.tsx | 40 ++++++ src/components/navbar.tsx | 3 + src/lib/download.ts | 178 +++++++++++++++------------ 4 files changed, 140 insertions(+), 82 deletions(-) create mode 100644 src/components/download-all-menu.tsx diff --git a/package.json b/package.json index a10105f..9b7ab74 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "date-fns": "^4.1.0", "isomorphic-dompurify": "^2.16.0", "jspdf": "^2.5.2", + "jszip": "^3.10.1", "lucide-react": "^0.454.0", "marked": "^14.1.3", "next": "14.2.16", diff --git a/src/components/download-all-menu.tsx b/src/components/download-all-menu.tsx new file mode 100644 index 0000000..4d4af83 --- /dev/null +++ b/src/components/download-all-menu.tsx @@ -0,0 +1,40 @@ +import { + DropdownMenu, + DropdownMenuContent, + DropdownMenuItem, + DropdownMenuTrigger, +} from "@/components/ui/dropdown-menu" +import { Button } from "@/components/ui/button" +import { Download } from "lucide-react" +import { downloadAllAsZip } from "@/lib/download" +import { Tooltip, TooltipContent, TooltipTrigger } from "./ui/tooltip" + +export function DownloadAllMenu() { + return ( + + + + + + + + downloadAllAsZip('markdown')}> + Download All as Markdown + + downloadAllAsZip('html')}> + Download All as HTML + + downloadAllAsZip('pdf')}> + Download All as PDF + + + + + + Download All Logs + + + ) +} \ No newline at end of file diff --git a/src/components/navbar.tsx b/src/components/navbar.tsx index 1d7bc59..3d70e5f 100644 --- a/src/components/navbar.tsx +++ b/src/components/navbar.tsx @@ -8,6 +8,7 @@ import { Tooltip, TooltipContent, TooltipTrigger } from "./ui/tooltip" import { Input } from "./ui/input" import { useRouter, usePathname } from "next/navigation" import { useState } from "react" +import { DownloadAllMenu } from "./download-all-menu" export function Navbar() { const router = useRouter() @@ -60,6 +61,8 @@ export function Navbar() { )} + +