-
- {menuItems.map((item) => (
-
item.disabled && e.preventDefault()}
+
+
+
+
+ {/* Mobile Menu */}
+
+
+
- {item.text}
-
- ))}
+ Add
+
+ {menuItems.map((item) => (
+
item.disabled && e.preventDefault()}
+ >
+
+
{item.text}
+
+ ))}
+
-
+
>
);
}
diff --git a/apps/web/app/actions/doers.ts b/apps/web/app/actions/doers.ts
index 99a1b719..a1de7b54 100644
--- a/apps/web/app/actions/doers.ts
+++ b/apps/web/app/actions/doers.ts
@@ -65,6 +65,8 @@ const typeDecider = (content: string) => {
return "tweet";
} else if (content.match(/https?:\/\/[\w\.]+/)) {
return "page";
+ } else if (content.match(/https?:\/\/www\.[\w\.]+/)) {
+ return "page";
} else {
return "note";
}
@@ -138,7 +140,15 @@ export const createMemory = async (input: {
},
});
pageContent = await response.text();
- metadata = await getMetaData(input.content);
+
+ try {
+ metadata = await getMetaData(input.content);
+ } catch (e) {
+ return {
+ success: false,
+ error: "Failed to fetch metadata for the page. Please try again later.",
+ };
+ }
} else if (type === "tweet") {
const tweet = await getTweetData(input.content.split("/").pop() as string);
pageContent = JSON.stringify(tweet);
diff --git a/package.json b/package.json
index c94610a6..5d6e79ed 100644
--- a/package.json
+++ b/package.json
@@ -1,5 +1,5 @@
{
- "name": "cloudflare-saas-starter",
+ "name": "supermemory-ai",
"private": true,
"type": "module",
"scripts": {
@@ -34,7 +34,7 @@
"engines": {
"node": ">=18"
},
- "packageManager": "yarn@1.22.21",
+ "packageManager": "bun@1.1.0",
"workspaces": [
"apps/*",
"packages/*"
@@ -66,6 +66,7 @@
"@radix-ui/react-switch": "^1.1.0",
"@radix-ui/react-tabs": "^1.0.4",
"@radix-ui/react-toast": "^1.1.5",
+ "@radix-ui/react-tooltip": "^1.1.2",
"@tldraw/assets": "^2.2.0",
"@types/readline-sync": "^1.4.8",
"ai": "^3.1.14",
diff --git a/packages/tailwind-config/globals.css b/packages/tailwind-config/globals.css
index d09b120b..0b12258c 100644
--- a/packages/tailwind-config/globals.css
+++ b/packages/tailwind-config/globals.css
@@ -5,10 +5,10 @@
:root {
--foreground: rgba(179, 188, 197, 1);
--foreground-menu: rgba(106, 115, 125, 1);
- --background: rgba(23, 27, 31, 1);
- --secondary: rgba(31, 36, 40, 1);
+ --background: rgba(31, 36, 40, 1);
+ --secondary: rgb(45, 51, 58);
--primary: rgba(54, 157, 253, 1);
- --border: rgba(51, 57, 67, 1);
+ --border: rgba(62, 68, 73, 1);
--card: 0 0% 100%;
--card-foreground: 0 0% 3.9%;
diff --git a/packages/tailwind-config/tailwind.config.ts b/packages/tailwind-config/tailwind.config.ts
index bd3f26b1..7de0393c 100644
--- a/packages/tailwind-config/tailwind.config.ts
+++ b/packages/tailwind-config/tailwind.config.ts
@@ -8,6 +8,7 @@ const config = {
"./app/**/*.{ts,tsx}",
"./src/**/*.{ts,tsx}",
"../../packages/ui/**/*.{js,ts,jsx,tsx}", // Add the ui package
+ "../../packages/ui/shadcn/**/*.{js,ts,jsx,tsx}", // Add the ui package
],
prefix: "",
theme: {
diff --git a/packages/ui/icons/add.svg b/packages/ui/icons/add.svg
index 970a7c95..ede03f81 100644
--- a/packages/ui/icons/add.svg
+++ b/packages/ui/icons/add.svg
@@ -1,3 +1,3 @@
\ No newline at end of file
diff --git a/packages/ui/icons/arrowright.svg b/packages/ui/icons/arrowright.svg
index d794b094..759472c6 100644
--- a/packages/ui/icons/arrowright.svg
+++ b/packages/ui/icons/arrowright.svg
@@ -1,3 +1,3 @@
\ No newline at end of file
diff --git a/packages/ui/icons/canvas.svg b/packages/ui/icons/canvas.svg
index 529c75de..141d4801 100644
--- a/packages/ui/icons/canvas.svg
+++ b/packages/ui/icons/canvas.svg
@@ -1,3 +1,3 @@
diff --git a/packages/ui/icons/explore.svg b/packages/ui/icons/explore.svg
index 98785c14..aa056cbc 100644
--- a/packages/ui/icons/explore.svg
+++ b/packages/ui/icons/explore.svg
@@ -1,3 +1,3 @@
\ No newline at end of file
diff --git a/packages/ui/icons/memories.svg b/packages/ui/icons/memories.svg
index 069b4db8..425bd583 100644
--- a/packages/ui/icons/memories.svg
+++ b/packages/ui/icons/memories.svg
@@ -1,3 +1,3 @@
\ No newline at end of file
diff --git a/packages/ui/shadcn/button.tsx b/packages/ui/shadcn/button.tsx
index 90c4fa46..a91ff896 100644
--- a/packages/ui/shadcn/button.tsx
+++ b/packages/ui/shadcn/button.tsx
@@ -1,8 +1,8 @@
+import * as React from "react";
import { Slot } from "@radix-ui/react-slot";
import { cva, type VariantProps } from "class-variance-authority";
-import { cn } from "@repo/ui/lib/utils";
-import React from "react";
+import { cn } from "../lib/utils";
const buttonVariants = cva(
"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
diff --git a/packages/ui/shadcn/combobox.tsx b/packages/ui/shadcn/combobox.tsx
index 0d0fd714..9eb62cf8 100644
--- a/packages/ui/shadcn/combobox.tsx
+++ b/packages/ui/shadcn/combobox.tsx
@@ -1,528 +1,76 @@
"use client";
-import * as React from "react";
-import { forwardRef, useEffect } from "react";
-import { Command as CommandPrimitive, useCommandState } from "cmdk";
-import { X } from "lucide-react";
-
+import React, { useState, useEffect } from "react";
+import { Check, ChevronsUpDown } from "lucide-react";
import { cn } from "../lib/utils";
-import { Badge } from "./badge";
-import { Command, CommandGroup, CommandItem, CommandList } from "./command";
+import { Button } from "./button";
+import {
+ Command,
+ CommandEmpty,
+ CommandGroup,
+ CommandInput,
+ CommandItem,
+ CommandList,
+} from "./command";
-export interface Option {
+interface Option {
value: string;
label: string;
- disable?: boolean;
- /** fixed option that can't be removed. */
- fixed?: boolean;
- /** Group the options by providing key. */
- [key: string]: string | boolean | undefined;
-}
-interface GroupOption {
- [key: string]: Option[];
}
-interface MultipleSelectorProps {
- value?: Option[];
- defaultOptions?: Option[];
- /** manually controlled options */
- options?: Option[];
+interface ComboboxWithCreateProps {
+ options: Option[];
+ onSelect: (value: string) => void;
+ onSubmit: () => void;
placeholder?: string;
- /** Loading component. */
- loadingIndicator?: React.ReactNode;
- /** Empty component. */
- emptyIndicator?: React.ReactNode;
- /** Debounce time for async search. Only work with `onSearch`. */
- delay?: number;
- /**
- * Only work with `onSearch` prop. Trigger search when `onFocus`.
- * For example, when user click on the input, it will trigger the search to get initial options.
- **/
- triggerSearchOnFocus?: boolean;
- /** async search */
- onSearch?: (value: string) => Promise