diff --git a/apps/web/components/menu.tsx b/apps/web/components/menu.tsx index 9b9abd81..95ade05e 100644 --- a/apps/web/components/menu.tsx +++ b/apps/web/components/menu.tsx @@ -9,7 +9,7 @@ import { Button } from "@repo/ui/components/button"; import { HeadingH2Bold } from "@repo/ui/text/heading/heading-h2-bold"; import { GlassMenuEffect } from "@ui/other/glass-effect"; import { useCustomer } from "autumn-js/react"; -import { MessageSquareMore, Plus, User, X } from "lucide-react"; +import { MessageSquareMore, Plus, Puzzle, User, X } from "lucide-react"; import { AnimatePresence, LayoutGroup, motion } from "motion/react"; import { useEffect, useState } from "react"; import { Drawer } from "vaul"; @@ -19,6 +19,7 @@ import { useChatOpen } from "@/stores"; import { ProjectSelector } from "./project-selector"; import { useTour } from "./tour"; import { AddMemoryExpandedView, AddMemoryView } from "./views/add-memory"; +import { IntegrationsView } from "./views/integrations"; import { MCPView } from "./views/mcp"; import { ProfileView } from "./views/profile"; @@ -41,7 +42,7 @@ const MCPIcon = ({ className }: { className?: string }) => { function Menu({ id }: { id?: string }) { const [isHovered, setIsHovered] = useState(false); const [expandedView, setExpandedView] = useState< - "addUrl" | "mcp" | "projects" | "profile" | null + "addUrl" | "mcp" | "projects" | "profile" | "integrations" | null >(null); const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false); const [isCollapsing, setIsCollapsing] = useState(false); @@ -52,12 +53,12 @@ function Menu({ id }: { id?: string }) { const autumn = useCustomer(); const { setIsOpen } = useChatOpen(); - const { data: memoriesCheck } = fetchMemoriesFeature(autumn as any); + const { data: memoriesCheck } = fetchMemoriesFeature(autumn); const memoriesUsed = memoriesCheck?.usage ?? 0; const memoriesLimit = memoriesCheck?.included_usage ?? 0; - const { data: proCheck } = fetchConsumerProProduct(autumn as any); + const { data: proCheck } = fetchConsumerProProduct(autumn); useEffect(() => { if (memoriesCheck) { @@ -79,6 +80,7 @@ function Menu({ id }: { id?: string }) { addUrl: TOUR_STEP_IDS.MENU_ADD_MEMORY, projects: TOUR_STEP_IDS.MENU_PROJECTS, mcp: TOUR_STEP_IDS.MENU_MCP, + integrations: "", // No tour ID for integrations yet }; const menuItems = [ @@ -94,6 +96,12 @@ function Menu({ id }: { id?: string }) { key: "chat" as const, disabled: false, }, + { + icon: Puzzle, + text: "Integrations", + key: "integrations" as const, + disabled: false, + }, { icon: MCPIcon, text: "MCP", @@ -109,7 +117,7 @@ function Menu({ id }: { id?: string }) { ]; const handleMenuItemClick = ( - key: "chat" | "addUrl" | "mcp" | "projects" | "profile", + key: "chat" | "addUrl" | "mcp" | "projects" | "profile" | "integrations", ) => { if (key === "chat") { setIsOpen(true); @@ -365,6 +373,7 @@ function Menu({ id }: { id?: string }) { {expandedView === "mcp" && "Model Context Protocol"} {expandedView === "profile" && "Profile"} + {expandedView === "integrations" && "Integrations"} {expandedView === "mcp" && } {expandedView === "profile" && } + {expandedView === "integrations" && ( + + )} )} @@ -530,7 +542,8 @@ function Menu({ id }: { id?: string }) { handleMenuItemClick(item.key); if ( item.key !== "mcp" && - item.key !== "profile" + item.key !== "profile" && + item.key !== "integrations" ) { setIsMobileMenuOpen(false); } @@ -590,6 +603,8 @@ function Menu({ id }: { id?: string }) { {expandedView === "mcp" && "Model Context Protocol"} {expandedView === "profile" && "Profile"} + {expandedView === "integrations" && + "Integrations"} + + + + + + {/* Chrome Extension */} +
+
+
+
+ +
+
+
+

+ Chrome Extension +

+
+ Coming Soon +
+
+

+ Save web content with one click +

+
+
+
+
+ +
+

+ More integrations are coming soon! Have a suggestion? Share it with us + on{" "} + + X + + . +

+
+ + {/* API Key Modal */} + + + + + + Setup{" "} + {selectedShortcutType === "add" + ? "Add Memory" + : selectedShortcutType === "search" + ? "Search Memory" + : "iOS"}{" "} + Shortcut + + + +
+ {/* API Key Section */} +
+ +
+ + +
+
+ + {/* Steps */} +
+

+ Follow these steps: +

+
+
+
+ 1 +
+

+ Click "Add to Shortcuts" below to open the shortcut +

+
+
+
+ 2 +
+

+ Paste your API key when prompted +

+
+
+
+ 3 +
+

+ Start using your shortcut! +

+
+
+
+ +
+ +
+
+
+
+
+ + ); +} diff --git a/apps/web/public/images/ios-shortcuts.png b/apps/web/public/images/ios-shortcuts.png new file mode 100644 index 00000000..044fb683 Binary files /dev/null and b/apps/web/public/images/ios-shortcuts.png differ diff --git a/packages/lib/constants.ts b/packages/lib/constants.ts index 1bfd1ea8..fde5bce1 100644 --- a/packages/lib/constants.ts +++ b/packages/lib/constants.ts @@ -1,4 +1,13 @@ const BIG_DIMENSIONS_NEW = 1536 const DEFAULT_PROJECT_ID = "sm_project_default" +const SEARCH_MEMORY_SHORTCUT_URL = + "https://www.icloud.com/shortcuts/f2b5c544372844a38ab4c6900e2a88de" +const ADD_MEMORY_SHORTCUT_URL = + "https://www.icloud.com/shortcuts/ec33b029b2c7481d89eda7640dbb7688" -export { BIG_DIMENSIONS_NEW, DEFAULT_PROJECT_ID } +export { + BIG_DIMENSIONS_NEW, + DEFAULT_PROJECT_ID, + SEARCH_MEMORY_SHORTCUT_URL, + ADD_MEMORY_SHORTCUT_URL, +}