+
-
- {document.url && !document.url.includes("x.com") && !document.url.includes("twitter.com") && !document.url.includes("files.supermemory.ai") && (
-
-
+ {document.url &&
+ !document.url.includes("x.com") &&
+ !document.url.includes("twitter.com") &&
+ !document.url.includes("files.supermemory.ai") && (
+
+
+ {document.title}
+
+
+
+
)}
- >
- {document.title}
-
-
-
+
+
+
+ {document.memoryEntries.length} memories
+
+
+ {new Date(document.createdAt).toLocaleDateString("en-US", {
+ month: "short",
+ day: "numeric",
+ year: "numeric",
+ })}
+
+
- )}
-
-
-
- {document.memoryEntries.length} memories
-
-
- {new Date(document.createdAt).toLocaleDateString("en-US", {
- month: "short",
- day: "numeric",
- year: "numeric",
- })}
-
-
-
+ )}
)
},
@@ -289,72 +301,7 @@ const DocumentCard = memo(
DocumentCard.displayName = "DocumentCard"
-function getAbsoluteUrl(url: string): string {
- try {
- const urlObj = new URL(url)
- return urlObj.host.replace(/^www\./, "")
- } catch {
- const match = url.match(/^https?:\/\/([^\/]+)/)
- const host = match?.[1] ?? url.replace(/^https?:\/\//, "")
- return host.replace(/^www\./, "")
- }
-}
-
-function SyncLogoIcon({ className }: { className?: string }) {
- return (
-
- )
-}
-
function ContentPreview({ document }: { document: DocumentWithMemories }) {
- // Check for Google Docs
if (
document.url?.includes("https://docs.googleapis.com/v1/documents") ||
document.url?.includes("docs.google.com/document") ||
@@ -363,7 +310,6 @@ function ContentPreview({ document }: { document: DocumentWithMemories }) {
return
}
- // Check for Twitter
if (
document.url?.includes("x.com/") &&
document.metadata?.sm_internal_twitter_metadata
@@ -377,6 +323,10 @@ function ContentPreview({ document }: { document: DocumentWithMemories }) {
)
}
+ if (document.source === "mcp") {
+ return
+ }
+
if (isYouTubeUrl(document.url)) {
return
}
@@ -390,7 +340,6 @@ function ContentPreview({ document }: { document: DocumentWithMemories }) {
return
}
- // Check for Website
if (document.url?.includes("https://")) {
return
}
diff --git a/apps/web/components/new/document-cards/youtube-utils.ts b/apps/web/components/new/utils.ts
similarity index 76%
rename from apps/web/components/new/document-cards/youtube-utils.ts
rename to apps/web/components/new/utils.ts
index 9ac1e508..b830a2a3 100644
--- a/apps/web/components/new/document-cards/youtube-utils.ts
+++ b/apps/web/components/new/utils.ts
@@ -11,7 +11,9 @@ export function isYouTubeUrl(url: string | undefined | null): boolean {
)
}
-export function extractYouTubeVideoId(url: string | undefined | null): string | null {
+export function extractYouTubeVideoId(
+ url: string | undefined | null,
+): string | null {
if (!url) return null
// Handle youtu.be format
@@ -27,7 +29,9 @@ export function extractYouTubeVideoId(url: string | undefined | null): string |
if (embedMatch?.[1]) return embedMatch[1]
// Handle m.youtube.com format
- const mobileMatch = url.match(/(?:m\.youtube\.com\/watch\?v=)([a-zA-Z0-9_-]{11})/)
+ const mobileMatch = url.match(
+ /(?:m\.youtube\.com\/watch\?v=)([a-zA-Z0-9_-]{11})/,
+ )
if (mobileMatch?.[1]) return mobileMatch[1]
return null
@@ -61,3 +65,14 @@ export function useYouTubeChannelName(url: string | undefined | null) {
})
}
+
+export function getAbsoluteUrl(url: string): string {
+ try {
+ const urlObj = new URL(url)
+ return urlObj.host.replace(/^www\./, "")
+ } catch {
+ const match = url.match(/^https?:\/\/([^\/]+)/)
+ const host = match?.[1] ?? url.replace(/^https?:\/\//, "")
+ return host.replace(/^www\./, "")
+ }
+}
diff --git a/biome.json b/biome.json
index 0c9043b5..ea4876ba 100644
--- a/biome.json
+++ b/biome.json
@@ -81,13 +81,6 @@
"useNumberNamespace": "error",
"useSelfClosingElements": "error",
"useSingleVarDeclarator": "error"
- },
- "suspicious": {
- "noUnknownAtRules": {
- "options": {
- "ignore": ["source", "theme", "apply"]
- }
- }
}
}
},
diff --git a/packages/ui/assets/icons.tsx b/packages/ui/assets/icons.tsx
index ef24567a..c8c8dcc5 100644
--- a/packages/ui/assets/icons.tsx
+++ b/packages/ui/assets/icons.tsx
@@ -206,3 +206,159 @@ export const PDF = ({ className }: { className?: string }) => (
/>
);
+
+export const SyncLogoIcon = ({ className }: { className?: string }) => {
+ return (
+
+ );
+};
+
+export const MCPIcon = ({ className }: { className?: string }) => {
+ return (
+
+ );
+};
+
+export const ClaudeDesktopIcon = ({ className }: { className?: string }) => {
+ return (
+
+ );
+};