diff --git a/surfsense_web/app/dashboard/[search_space_id]/buy-more/page.tsx b/surfsense_web/app/dashboard/[search_space_id]/buy-more/page.tsx
index da2b5787b..74bcaff2e 100644
--- a/surfsense_web/app/dashboard/[search_space_id]/buy-more/page.tsx
+++ b/surfsense_web/app/dashboard/[search_space_id]/buy-more/page.tsx
@@ -4,8 +4,7 @@ import { motion } from "motion/react";
import { useState } from "react";
import { BuyPagesContent } from "@/components/settings/buy-pages-content";
import { BuyTokensContent } from "@/components/settings/buy-tokens-content";
-import { Button } from "@/components/ui/button";
-import { cn } from "@/lib/utils";
+import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
const TABS = [
{ id: "pages", label: "Pages" },
@@ -22,29 +21,34 @@ export default function BuyMorePage() {
initial={{ opacity: 0, y: 20 }}
animate={{ opacity: 1, y: 0 }}
transition={{ duration: 0.3 }}
- className="w-full select-none space-y-6"
+ className="w-full select-none"
>
-
- {TABS.map((tab) => (
-
- ))}
-
+ {
+ setActiveTab(value as TabId);
+ }}
+ className="relative min-h-[37rem] w-full"
+ >
+
+ {TABS.map((tab) => (
+
+ {tab.label}
+
+ ))}
+
- {activeTab === "pages" ? : }
+
+
+
+
+
+
+
);
}
diff --git a/surfsense_web/app/dashboard/[search_space_id]/more-pages/page.tsx b/surfsense_web/app/dashboard/[search_space_id]/more-pages/page.tsx
index 9c0b2c4e7..4b3301b9f 100644
--- a/surfsense_web/app/dashboard/[search_space_id]/more-pages/page.tsx
+++ b/surfsense_web/app/dashboard/[search_space_id]/more-pages/page.tsx
@@ -1,17 +1,11 @@
"use client";
-import { motion } from "motion/react";
import { MorePagesContent } from "@/components/settings/more-pages-content";
export default function MorePagesPage() {
return (
-
+
-
+
);
}
diff --git a/surfsense_web/components/assistant-ui/thread.tsx b/surfsense_web/components/assistant-ui/thread.tsx
index 60c4a4d25..d30996c40 100644
--- a/surfsense_web/components/assistant-ui/thread.tsx
+++ b/surfsense_web/components/assistant-ui/thread.tsx
@@ -23,6 +23,7 @@ import {
Wrench,
X,
} from "lucide-react";
+import { AnimatePresence, motion } from "motion/react";
import Image from "next/image";
import { useParams } from "next/navigation";
import { type FC, useCallback, useEffect, useMemo, useRef, useState } from "react";
@@ -271,59 +272,76 @@ const ConnectToolsBanner: FC<{
if (typeof window === "undefined") return false;
return localStorage.getItem(BANNER_DISMISSED_KEY) === "true";
});
+ const [dismissRequested, setDismissRequested] = useState(false);
const hasConnectors = (connectors?.length ?? 0) > 0;
const isVisible = !dismissed && !hasConnectors && isThreadEmpty;
+ const shouldShowTray = isVisible && !dismissRequested;
useEffect(() => {
onVisibleChange?.(isVisible);
}, [isVisible, onVisibleChange]);
- if (!isVisible) return null;
-
const handleDismiss = (e: React.MouseEvent) => {
e.stopPropagation();
- setDismissed(true);
- localStorage.setItem(BANNER_DISMISSED_KEY, "true");
+ setDismissRequested(true);
};
return (
-
-
-
-
- {BANNER_CONNECTORS.map(({ type }, i) => (
- {
+ if (!dismissRequested) return;
+ setDismissed(true);
+ localStorage.setItem(BANNER_DISMISSED_KEY, "true");
+ }}
+ >
+ {shouldShowTray ? (
+
+
- ))}
-
-
-
+
+ Connect your tools
+
+
+
+ {BANNER_CONNECTORS.map(({ type }, i) => (
+
+
+ {getConnectorIcon(type, "size-3")}
+
+
+ ))}
+
+
+
+ ) : null}
+
);
};
diff --git a/surfsense_web/components/settings/buy-pages-content.tsx b/surfsense_web/components/settings/buy-pages-content.tsx
index 3cb8e7133..82b8d8e2a 100644
--- a/surfsense_web/components/settings/buy-pages-content.tsx
+++ b/surfsense_web/components/settings/buy-pages-content.tsx
@@ -74,11 +74,11 @@ export function BuyPagesContent() {
@@ -87,11 +87,11 @@ export function BuyPagesContent() {
@@ -107,10 +107,10 @@ export function BuyPagesContent() {
onClick={() => setQuantity(m)}
disabled={purchaseMutation.isPending}
className={cn(
- "h-auto rounded-md border px-2.5 py-1 text-xs font-medium tabular-nums transition-colors hover:text-foreground disabled:opacity-60",
+ "h-auto rounded-md px-2.5 py-1 text-xs font-medium tabular-nums transition-colors disabled:opacity-60",
quantity === m
- ? "border-emerald-500 bg-emerald-500/10 text-emerald-600 dark:text-emerald-400"
- : "border-border hover:border-emerald-500/40 hover:bg-muted/40"
+ ? "bg-accent text-accent-foreground"
+ : "text-muted-foreground hover:bg-accent hover:text-accent-foreground"
)}
>
{(m * PAGE_PACK_SIZE).toLocaleString()}
@@ -126,7 +126,7 @@ export function BuyPagesContent() {