aboutsummaryrefslogtreecommitdiff
path: root/apps/web/components/memories-utils
diff options
context:
space:
mode:
authorMaheshtheDev <[email protected]>2025-11-03 00:41:58 +0000
committerMaheshtheDev <[email protected]>2025-11-03 00:41:59 +0000
commit8d8d6d91aa8cdec49e7e6ef87cbc5622d0bc16ed (patch)
tree27862f7558d837615d2af6cea8c30ea03d414096 /apps/web/components/memories-utils
parentchore: update readme with recent updates and latest demo (#547) (diff)
downloadsupermemory-8d8d6d91aa8cdec49e7e6ef87cbc5622d0bc16ed.tar.xz
supermemory-8d8d6d91aa8cdec49e7e6ef87cbc5622d0bc16ed.zip
feat(browser-extension): webpages capture with markdown conversion (#548)10-31-feat_browser-extension_webpages_capture_with_markdown_conversion
Improved browser extension memory saving with better content handling and added markdown conversion. ### What changed? - Enhanced memory content handling in the background script to prioritize different content types (explicit content, highlighted text, markdown, HTML, or URL) - Added HTML to markdown conversion using TurndownService when saving entire pages - Improved HTML handling by removing script tags before processing - Updated the web app to display the saved URL from metadata when available - Added turndown library and its type definitions as dependencies
Diffstat (limited to 'apps/web/components/memories-utils')
-rw-r--r--apps/web/components/memories-utils/index.tsx3
-rw-r--r--apps/web/components/memories-utils/memory-detail.tsx2
2 files changed, 4 insertions, 1 deletions
diff --git a/apps/web/components/memories-utils/index.tsx b/apps/web/components/memories-utils/index.tsx
index 3052f3c7..fca4d367 100644
--- a/apps/web/components/memories-utils/index.tsx
+++ b/apps/web/components/memories-utils/index.tsx
@@ -48,6 +48,9 @@ export const getSourceUrl = (document: DocumentWithMemories) => {
if (document.type === "google_slide" && document.customId) {
return `https://docs.google.com/presentation/d/${document.customId}`
}
+ if(document.metadata?.website_url) {
+ return document.metadata?.website_url as string
+ }
// Fallback to existing URL for all other document types
return document.url
}
diff --git a/apps/web/components/memories-utils/memory-detail.tsx b/apps/web/components/memories-utils/memory-detail.tsx
index 378d3f79..dbbc51cb 100644
--- a/apps/web/components/memories-utils/memory-detail.tsx
+++ b/apps/web/components/memories-utils/memory-detail.tsx
@@ -161,7 +161,7 @@ export const MemoryDetail = memo(
<span>{formatDate(document.createdAt)}</span>
</div>
</div>
- {document.url && (
+ {(document.url || document.metadata?.website_url) && (
<div className="flex items-end">
<Button
onClick={() => {