aboutsummaryrefslogtreecommitdiff
path: root/apps/web/lib
diff options
context:
space:
mode:
authorDhravya Shah <[email protected]>2025-10-01 18:11:49 -0700
committerDhravya Shah <[email protected]>2025-10-01 18:11:49 -0700
commit514f6a6f41dd4a8c4e02ed7965b562984991e4dd (patch)
treecd33545eb6a4b78bb50d070156a37e0b41b2a612 /apps/web/lib
parentfeat: Add memory vs rag and migration section to docs (diff)
parentui: fix progress bar thickness on regular browser (#445) (diff)
downloadarchived-supermemory-514f6a6f41dd4a8c4e02ed7965b562984991e4dd.tar.xz
archived-supermemory-514f6a6f41dd4a8c4e02ed7965b562984991e4dd.zip
Merge branch 'main' of https://github.com/supermemoryai/supermemory
Diffstat (limited to 'apps/web/lib')
-rw-r--r--apps/web/lib/analytics.ts3
-rw-r--r--apps/web/lib/document-icon.tsx7
-rw-r--r--apps/web/lib/theme-provider.tsx8
-rw-r--r--apps/web/lib/tour-constants.ts23
4 files changed, 14 insertions, 27 deletions
diff --git a/apps/web/lib/analytics.ts b/apps/web/lib/analytics.ts
index 28f1d4fe..428ac872 100644
--- a/apps/web/lib/analytics.ts
+++ b/apps/web/lib/analytics.ts
@@ -2,9 +2,6 @@ import posthog from "posthog-js"
export const analytics = {
userSignedOut: () => posthog.capture("user_signed_out"),
- tourStarted: () => posthog.capture("tour_started"),
- tourCompleted: () => posthog.capture("tour_completed"),
- tourSkipped: () => posthog.capture("tour_skipped"),
memoryAdded: (props: {
type: "note" | "link" | "file"
diff --git a/apps/web/lib/document-icon.tsx b/apps/web/lib/document-icon.tsx
index 3a80b2e0..a0f56e63 100644
--- a/apps/web/lib/document-icon.tsx
+++ b/apps/web/lib/document-icon.tsx
@@ -1,3 +1,4 @@
+import { MCPIcon } from '@/components/menu';
import { colors } from '@repo/ui/memory-graph/constants';
import {
GoogleDocs,
@@ -14,12 +15,16 @@ import {
} from '@ui/assets/icons';
import { FileText } from 'lucide-react';
-export const getDocumentIcon = (type: string, className: string) => {
+export const getDocumentIcon = (type: string, className: string, source?: string) => {
const iconProps = {
className,
style: { color: colors.text.muted },
};
+ if(source === "mcp") {
+ return <MCPIcon {...iconProps} />;
+ }
+
switch (type) {
case 'google_doc':
return <GoogleDocs {...iconProps} />;
diff --git a/apps/web/lib/theme-provider.tsx b/apps/web/lib/theme-provider.tsx
new file mode 100644
index 00000000..7e3a551f
--- /dev/null
+++ b/apps/web/lib/theme-provider.tsx
@@ -0,0 +1,8 @@
+"use client"
+
+import { ThemeProvider as NextThemesProvider } from "next-themes"
+import type { ThemeProviderProps } from "next-themes"
+
+export function ThemeProvider({ children, ...props }: ThemeProviderProps) {
+ return <NextThemesProvider {...props}>{children}</NextThemesProvider>
+}
diff --git a/apps/web/lib/tour-constants.ts b/apps/web/lib/tour-constants.ts
deleted file mode 100644
index 9857c878..00000000
--- a/apps/web/lib/tour-constants.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-// Tour step IDs - these should match the IDs added to elements in your app
-export const TOUR_STEP_IDS = {
- LOGO: "tour-logo",
- MENU_BUTTON: "tour-menu-button",
- VIEW_TOGGLE: "tour-view-toggle",
- MEMORY_GRAPH: "tour-memory-graph",
- MEMORY_LIST: "tour-memory-list",
- FLOATING_CHAT: "tour-floating-chat",
- ADD_MEMORY: "tour-add-memory",
- SPACES_DROPDOWN: "tour-spaces-dropdown",
- SETTINGS: "tour-settings",
- MENU_CONNECTIONS: "tour-connections",
- // Menu items
- MENU_ADD_MEMORY: "tour-menu-add-memory",
- MENU_PROJECTS: "tour-menu-projects",
- MENU_MCP: "tour-menu-mcp",
- MENU_BILLING: "tour-menu-billing",
- // Legend
- LEGEND: "tour-legend",
-} as const;
-
-// Tour storage key for localStorage
-export const TOUR_STORAGE_KEY = "supermemory-tour-completed";