diff --git a/apps/browser-extension/entrypoints/content/chatgpt.ts b/apps/browser-extension/entrypoints/content/chatgpt.ts
index c51bbb3e..9bda2267 100644
--- a/apps/browser-extension/entrypoints/content/chatgpt.ts
+++ b/apps/browser-extension/entrypoints/content/chatgpt.ts
@@ -208,10 +208,7 @@ async function getRelatedMemoriesForChatGPT(actionSource: string) {
promptElement,
response.data,
)
- console.log(
- "Prompt element dataset:",
- memoryText,
- )
+ console.log("Prompt element dataset:", memoryText)
iconElement.dataset.memoriesData = String(response.data)
@@ -387,220 +384,6 @@ function updateChatGPTIconFeedback(
message.toLowerCase().includes("error") ? "error" : "none",
)
showMarkerPopover(iconElement, message, undefined, fallbackReset)
- return
-
- if (!iconElement.dataset.originalHtml) {
- iconElement.dataset.originalHtml = iconElement.innerHTML
- }
-
- const feedbackDiv = document.createElement("div")
- feedbackDiv.style.cssText = `
- display: flex;
- align-items: center;
- gap: 6px;
- padding: 4px 8px;
- background: #513EA9;
- border-radius: 12px;
- color: white;
- font-size: 12px;
- font-weight: 500;
- cursor: ${message === "Included Memories" ? "pointer" : "default"};
- position: relative;
- `
-
- feedbackDiv.innerHTML = `
- ✓
- ${message}
- `
-
- if (message === "Included Memories" && iconElement.dataset.memoriesData) {
- const popup = document.createElement("div")
- popup.style.cssText = `
- position: fixed;
- bottom: 80px;
- left: 50%;
- transform: translateX(-50%);
- background: #1a1a1a;
- color: white;
- padding: 0;
- border-radius: 12px;
- font-size: 13px;
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
- max-width: 500px;
- max-height: 400px;
- box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
- z-index: 999999;
- display: none;
- border: 1px solid #333;
- `
-
- const header = document.createElement("div")
- header.style.cssText = `
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 8px;
- border-bottom: 1px solid #333;
- opacity: 0.8;
- `
- header.innerHTML = `
- Included Memories
- `
-
- const content = document.createElement("div")
- content.style.cssText = `
- padding: 0;
- max-height: 300px;
- overflow-y: auto;
- `
-
- const memoriesText = iconElement.dataset.memoriesData || ""
- console.log("Memories text:", memoriesText)
- const individualMemories = memoriesText
- .split(/[,\n]/)
- .map((memory) => memory.trim())
- .filter((memory) => memory.length > 0 && memory !== ",")
- console.log("Individual memories:", individualMemories)
-
- individualMemories.forEach((memory, index) => {
- const memoryItem = document.createElement("div")
- memoryItem.style.cssText = `
- display: flex;
- align-items: center;
- gap: 6px;
- padding: 10px;
- font-size: 13px;
- line-height: 1.4;
- `
-
- const memoryText = document.createElement("div")
- memoryText.style.cssText = `
- flex: 1;
- color: #e5e5e5;
- `
- memoryText.textContent = memory.trim()
-
- const removeBtn = document.createElement("button")
- removeBtn.style.cssText = `
- background: transparent;
- color: #9ca3af;
- border: none;
- padding: 4px;
- border-radius: 4px;
- cursor: pointer;
- flex-shrink: 0;
- height: fit-content;
- display: flex;
- align-items: center;
- justify-content: center;
- `
- removeBtn.innerHTML = ``
- removeBtn.dataset.memoryIndex = index.toString()
-
- removeBtn.addEventListener("mouseenter", () => {
- removeBtn.style.color = "#ef4444"
- })
- removeBtn.addEventListener("mouseleave", () => {
- removeBtn.style.color = "#9ca3af"
- })
-
- memoryItem.appendChild(memoryText)
- memoryItem.appendChild(removeBtn)
- content.appendChild(memoryItem)
- })
-
- popup.appendChild(header)
- popup.appendChild(content)
- document.body.appendChild(popup)
-
- feedbackDiv.addEventListener("mouseenter", () => {
- const textSpan = feedbackDiv.querySelector("span:last-child")
- if (textSpan) {
- textSpan.textContent = "Click to see memories"
- }
- })
-
- feedbackDiv.addEventListener("mouseleave", () => {
- const textSpan = feedbackDiv.querySelector("span:last-child")
- if (textSpan) {
- textSpan.textContent = "Included Memories"
- }
- })
-
- feedbackDiv.addEventListener("click", (e) => {
- e.stopPropagation()
- popup.style.display = "block"
- })
-
- document.addEventListener("click", (e) => {
- if (!popup.contains(e.target as Node)) {
- popup.style.display = "none"
- }
- })
-
- content.querySelectorAll("button[data-memory-index]").forEach((button) => {
- const htmlButton = button as HTMLButtonElement
- htmlButton.addEventListener("click", () => {
- const index = Number.parseInt(htmlButton.dataset.memoryIndex || "0", 10)
- const memoryItem = htmlButton.parentElement
-
- if (memoryItem) {
- content.removeChild(memoryItem)
- }
-
- const currentMemories = (iconElement.dataset.memoriesData || "")
- .split(/[,\n]/)
- .map((memory) => memory.trim())
- .filter((memory) => memory.length > 0 && memory !== ",")
- currentMemories.splice(index, 1)
-
- const updatedMemories = currentMemories.join(" ,")
-
- iconElement.dataset.memoriesData = updatedMemories
-
- const promptElement = document.getElementById("prompt-textarea")
- if (promptElement) {
- promptElement.dataset.supermemories = `\n\nSupermemories of user (only for the reference): ${updatedMemories}`
- }
-
- content
- .querySelectorAll("button[data-memory-index]")
- .forEach((btn, newIndex) => {
- const htmlBtn = btn as HTMLButtonElement
- htmlBtn.dataset.memoryIndex = newIndex.toString()
- })
-
- if (currentMemories.length <= 1) {
- if (promptElement?.dataset.supermemories) {
- delete promptElement.dataset.supermemories
- delete iconElement.dataset.memoriesData
- iconElement.innerHTML = iconElement.dataset.originalHtml || ""
- delete iconElement.dataset.originalHtml
- }
- popup.style.display = "none"
- if (document.body.contains(popup)) {
- document.body.removeChild(popup)
- }
- }
- })
- })
-
- setTimeout(() => {
- if (document.body.contains(popup)) {
- document.body.removeChild(popup)
- }
- }, 300000)
- }
-
- iconElement.innerHTML = ""
- iconElement.appendChild(feedbackDiv)
-
- if (resetAfter > 0) {
- setTimeout(() => {
- iconElement.innerHTML = iconElement.dataset.originalHtml || ""
- delete iconElement.dataset.originalHtml
- }, resetAfter)
- }
}
function addSaveChatGPTElementBeforeComposerBtn() {
@@ -623,7 +406,9 @@ function addSaveChatGPTElementBeforeComposerBtn() {
)
if (existingMarkers.length > 1) {
debugChatGPT("removed duplicate markers", existingMarkers.length)
- existingMarkers.forEach((marker) => marker.remove())
+ for (const marker of existingMarkers) {
+ marker.remove()
+ }
} else if (existingMarkers.length === 1) {
debugChatGPT("marker already exists")
return
@@ -642,7 +427,8 @@ function addSaveChatGPTElementBeforeComposerBtn() {
const micButton = buttons.find((button) => isChatGPTMicButton(button))
const voiceButton = buttons.find((button) => isChatGPTVoiceButton(button))
const sendButton = buttons.find((button) => isChatGPTSendButton(button))
- const anchorButton = micButton || voiceButton || sendButton || buttons[buttons.length - 1]
+ const anchorButton =
+ micButton || voiceButton || sendButton || buttons[buttons.length - 1]
const anchorSlot = findChatGPTButtonSlot(anchorButton, composer)
const speechContainer = composer.querySelector(
'[data-testid="composer-speech-button-container"]',
@@ -721,8 +507,9 @@ function findChatGPTComposerButtons(
return allButtons.filter((button) => {
const rect = button.getBoundingClientRect()
const verticallyNear =
- Math.abs(rect.top + rect.height / 2 - (inputRect.top + inputRect.height / 2)) <
- 120
+ Math.abs(
+ rect.top + rect.height / 2 - (inputRect.top + inputRect.height / 2),
+ ) < 120
const horizontallyNear =
rect.left > inputRect.left - 80 && rect.left < inputRect.right + 260
@@ -788,11 +575,7 @@ function describeElement(element: Element | null): string | null {
if (element.id) parts.push(`#${element.id}`)
if (element.className && typeof element.className === "string") {
parts.push(
- `.${element.className
- .trim()
- .split(/\s+/)
- .slice(0, 4)
- .join(".")}`,
+ `.${element.className.trim().split(/\s+/).slice(0, 4).join(".")}`,
)
}
@@ -842,7 +625,9 @@ async function setupChatGPTAutoFetch() {
if (content.length === 0) {
clearMemorySuggestion("chatgpt", promptTextarea)
document
- .querySelectorAll('[id*="sm-chatgpt-input-bar-element-before-composer"]')
+ .querySelectorAll(
+ '[id*="sm-chatgpt-input-bar-element-before-composer"]',
+ )
.forEach((icon) => {
setMemoryMarkerStatus(icon as HTMLElement, "neutral")
})
diff --git a/apps/browser-extension/entrypoints/content/claude.ts b/apps/browser-extension/entrypoints/content/claude.ts
index f045e6bf..5bd0d6e1 100644
--- a/apps/browser-extension/entrypoints/content/claude.ts
+++ b/apps/browser-extension/entrypoints/content/claude.ts
@@ -172,11 +172,15 @@ function addSupermemoryIconToClaudeInput() {
}
const existingMarkers = Array.from(
- document.querySelectorAll(`[id*="${ELEMENT_IDS.CLAUDE_INPUT_BAR_ELEMENT}"]`),
+ document.querySelectorAll(
+ `[id*="${ELEMENT_IDS.CLAUDE_INPUT_BAR_ELEMENT}"]`,
+ ),
)
if (existingMarkers.length > 1) {
debugClaude("removed duplicate markers", existingMarkers.length)
- existingMarkers.forEach((marker) => marker.remove())
+ for (const marker of existingMarkers) {
+ marker.remove()
+ }
} else if (existingMarkers.length === 1) {
debugClaude("marker already exists")
return
@@ -192,12 +196,11 @@ function addSupermemoryIconToClaudeInput() {
})),
})
- const micButton = buttons.find((button) =>
- isClaudeMicButton(button),
- )
+ const micButton = buttons.find((button) => isClaudeMicButton(button))
const voiceButton = buttons.find((button) => isClaudeVoiceButton(button))
const sendButton = buttons.find((button) => isClaudeSendButton(button))
- const anchorButton = micButton || voiceButton || sendButton || buttons[buttons.length - 1]
+ const anchorButton =
+ micButton || voiceButton || sendButton || buttons[buttons.length - 1]
const anchorSlot = findClaudeButtonSlot(anchorButton, composer)
const targetContainer = anchorSlot?.parentElement || input.parentElement
@@ -277,8 +280,9 @@ function findClaudeComposerButtons(
return allButtons.filter((button) => {
const rect = button.getBoundingClientRect()
const verticallyNear =
- Math.abs(rect.top + rect.height / 2 - (inputRect.top + inputRect.height / 2)) <
- 120
+ Math.abs(
+ rect.top + rect.height / 2 - (inputRect.top + inputRect.height / 2),
+ ) < 120
const horizontallyNear =
rect.left > inputRect.left - 80 && rect.left < inputRect.right + 260
@@ -330,11 +334,7 @@ function describeElement(element: Element | null): string | null {
if (element.id) parts.push(`#${element.id}`)
if (element.className && typeof element.className === "string") {
parts.push(
- `.${element.className
- .trim()
- .split(/\s+/)
- .slice(0, 4)
- .join(".")}`,
+ `.${element.className.trim().split(/\s+/).slice(0, 4).join(".")}`,
)
}
@@ -451,10 +451,7 @@ async function getRelatedMemoriesForClaude(actionSource: string) {
textareaElement,
response.data,
)
- console.log(
- "Text element dataset:",
- memoryText,
- )
+ console.log("Text element dataset:", memoryText)
iconElement.dataset.memoriesData = String(response.data)
@@ -712,222 +709,6 @@ function updateClaudeIconFeedback(
message.toLowerCase().includes("error") ? "error" : "none",
)
showMarkerPopover(iconElement, message, undefined, fallbackReset)
- return
-
- if (!iconElement.dataset.originalHtml) {
- iconElement.dataset.originalHtml = iconElement.innerHTML
- }
-
- const feedbackDiv = document.createElement("div")
- feedbackDiv.style.cssText = `
- display: flex;
- align-items: center;
- gap: 6px;
- padding: 6px 8px;
- background: #513EA9;
- border-radius: 6px;
- color: white;
- font-size: 12px;
- font-weight: 500;
- cursor: ${message === "Included Memories" ? "pointer" : "default"};
- position: relative;
- `
-
- feedbackDiv.innerHTML = `
- ✓
- ${message}
- `
-
- if (message === "Included Memories" && iconElement.dataset.memoriesData) {
- const popup = document.createElement("div")
- popup.style.cssText = `
- position: fixed;
- bottom: 80px;
- left: 50%;
- transform: translateX(-50%);
- background: #1a1a1a;
- color: white;
- padding: 0;
- border-radius: 12px;
- font-size: 13px;
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
- max-width: 500px;
- max-height: 400px;
- box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
- z-index: 999999;
- display: none;
- border: 1px solid #333;
- `
-
- const header = document.createElement("div")
- header.style.cssText = `
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 8px;
- border-bottom: 1px solid #333;
- opacity: 0.8;
- `
- header.innerHTML = `
- Included Memories
- `
-
- const content = document.createElement("div")
- content.style.cssText = `
- padding: 0;
- max-height: 300px;
- overflow-y: auto;
- `
-
- const memoriesText = iconElement.dataset.memoriesData || ""
- console.log("Memories text:", memoriesText)
- const individualMemories = memoriesText
- .split(/[,\n]/)
- .map((memory) => memory.trim())
- .filter((memory) => memory.length > 0 && memory !== ",")
- console.log("Individual memories:", individualMemories)
-
- individualMemories.forEach((memory, index) => {
- const memoryItem = document.createElement("div")
- memoryItem.style.cssText = `
- display: flex;
- align-items: center;
- gap: 6px;
- padding: 10px;
- font-size: 13px;
- line-height: 1.4;
- `
-
- const memoryText = document.createElement("div")
- memoryText.style.cssText = `
- flex: 1;
- color: #e5e5e5;
- `
- memoryText.textContent = memory.trim()
-
- const removeBtn = document.createElement("button")
- removeBtn.style.cssText = `
- background: transparent;
- color: #9ca3af;
- border: none;
- padding: 4px;
- border-radius: 4px;
- cursor: pointer;
- flex-shrink: 0;
- height: fit-content;
- display: flex;
- align-items: center;
- justify-content: center;
- `
- removeBtn.innerHTML = ``
- removeBtn.dataset.memoryIndex = index.toString()
-
- removeBtn.addEventListener("mouseenter", () => {
- removeBtn.style.color = "#ef4444"
- })
- removeBtn.addEventListener("mouseleave", () => {
- removeBtn.style.color = "#9ca3af"
- })
-
- memoryItem.appendChild(memoryText)
- memoryItem.appendChild(removeBtn)
- content.appendChild(memoryItem)
- })
-
- popup.appendChild(header)
- popup.appendChild(content)
- document.body.appendChild(popup)
-
- feedbackDiv.addEventListener("mouseenter", () => {
- const textSpan = feedbackDiv.querySelector("span:last-child")
- if (textSpan) {
- textSpan.textContent = "Click to see memories"
- }
- })
-
- feedbackDiv.addEventListener("mouseleave", () => {
- const textSpan = feedbackDiv.querySelector("span:last-child")
- if (textSpan) {
- textSpan.textContent = "Included Memories"
- }
- })
-
- feedbackDiv.addEventListener("click", (e) => {
- e.stopPropagation()
- popup.style.display = "block"
- })
-
- document.addEventListener("click", (e) => {
- if (!popup.contains(e.target as Node)) {
- popup.style.display = "none"
- }
- })
-
- content.querySelectorAll("button[data-memory-index]").forEach((button) => {
- const htmlButton = button as HTMLButtonElement
- htmlButton.addEventListener("click", () => {
- const index = Number.parseInt(htmlButton.dataset.memoryIndex || "0", 10)
- const memoryItem = htmlButton.parentElement
-
- if (memoryItem) {
- content.removeChild(memoryItem)
- }
-
- const currentMemories = (iconElement.dataset.memoriesData || "")
- .split(/[,\n]/)
- .map((memory) => memory.trim())
- .filter((memory) => memory.length > 0 && memory !== ",")
- currentMemories.splice(index, 1)
-
- const updatedMemories = currentMemories.join(" ,")
-
- iconElement.dataset.memoriesData = updatedMemories
-
- const textareaElement = document.querySelector(
- 'div[contenteditable="true"]',
- ) as HTMLElement
- if (textareaElement) {
- textareaElement.dataset.supermemories = `\n\nSupermemories of user (only for the reference): ${updatedMemories}`
- }
-
- content
- .querySelectorAll("button[data-memory-index]")
- .forEach((btn, newIndex) => {
- const htmlBtn = btn as HTMLButtonElement
- htmlBtn.dataset.memoryIndex = newIndex.toString()
- })
-
- if (currentMemories.length <= 1) {
- if (textareaElement?.dataset.supermemories) {
- delete textareaElement.dataset.supermemories
- delete iconElement.dataset.memoriesData
- iconElement.innerHTML = iconElement.dataset.originalHtml || ""
- delete iconElement.dataset.originalHtml
- }
- popup.style.display = "none"
- if (document.body.contains(popup)) {
- document.body.removeChild(popup)
- }
- }
- })
- })
-
- setTimeout(() => {
- if (document.body.contains(popup)) {
- document.body.removeChild(popup)
- }
- }, 300000)
- }
-
- iconElement.innerHTML = ""
- iconElement.appendChild(feedbackDiv)
-
- if (resetAfter > 0) {
- setTimeout(() => {
- iconElement.innerHTML = iconElement.dataset.originalHtml || ""
- delete iconElement.dataset.originalHtml
- }, resetAfter)
- }
}
function setupClaudePromptCapture() {
diff --git a/apps/browser-extension/entrypoints/content/gemini.ts b/apps/browser-extension/entrypoints/content/gemini.ts
index 64254cbb..04c670a2 100644
--- a/apps/browser-extension/entrypoints/content/gemini.ts
+++ b/apps/browser-extension/entrypoints/content/gemini.ts
@@ -160,11 +160,15 @@ function addSupermemoryIconToGeminiInput() {
}
const existingMarkers = Array.from(
- document.querySelectorAll(`[id*="${ELEMENT_IDS.GEMINI_INPUT_BAR_ELEMENT}"]`),
+ document.querySelectorAll(
+ `[id*="${ELEMENT_IDS.GEMINI_INPUT_BAR_ELEMENT}"]`,
+ ),
)
if (existingMarkers.length > 1) {
debugGemini("removed duplicate markers", existingMarkers.length)
- existingMarkers.forEach((marker) => marker.remove())
+ for (const marker of existingMarkers) {
+ marker.remove()
+ }
} else if (existingMarkers.length === 1) {
debugGemini("marker already exists")
return
@@ -180,9 +184,7 @@ function addSupermemoryIconToGeminiInput() {
})),
})
- const micButton = buttons.find((button) =>
- isGeminiMicButton(button),
- )
+ const micButton = buttons.find((button) => isGeminiMicButton(button))
const sendButton = buttons.find((button) => isGeminiSendButton(button))
const anchorButton = micButton || sendButton || buttons[buttons.length - 1]
const anchorSlot = findGeminiButtonSlot(anchorButton, composer)
@@ -259,8 +261,9 @@ function findGeminiComposerButtons(
return allButtons.filter((button) => {
const rect = button.getBoundingClientRect()
const verticallyNear =
- Math.abs(rect.top + rect.height / 2 - (inputRect.top + inputRect.height / 2)) <
- 120
+ Math.abs(
+ rect.top + rect.height / 2 - (inputRect.top + inputRect.height / 2),
+ ) < 120
const horizontallyNear =
rect.left > inputRect.left - 80 && rect.left < inputRect.right + 240
@@ -328,11 +331,7 @@ function describeElement(element: Element | null): string | null {
if (element.id) parts.push(`#${element.id}`)
if (element.className && typeof element.className === "string") {
parts.push(
- `.${element.className
- .trim()
- .split(/\s+/)
- .slice(0, 4)
- .join(".")}`,
+ `.${element.className.trim().split(/\s+/).slice(0, 4).join(".")}`,
)
}
@@ -364,7 +363,7 @@ function getInputText(input: GeminiInput | null): string {
return input.innerText || input.textContent || ""
}
-function appendStoredMemories(input: GeminiInput, storedMemories: string) {
+function _appendStoredMemories(input: GeminiInput, storedMemories: string) {
if (input instanceof HTMLTextAreaElement) {
const promptContent = input.value || ""
input.value = `${promptContent}${storedMemories}`
@@ -510,7 +509,7 @@ function setupGeminiPromptCapture() {
}
const input = getGeminiPromptInput()
- let promptContent = getInputText(input)
+ const promptContent = getInputText(input)
debugGemini("capture input state", {
hasInput: !!input,
promptLength: promptContent.length,
@@ -541,9 +540,7 @@ function setupGeminiPromptCapture() {
icons.forEach((icon) => {
const iconElement = icon as HTMLElement
- iconElement
- .querySelector("[data-supermemory-status-badge]")
- ?.remove()
+ iconElement.querySelector("[data-supermemory-status-badge]")?.remove()
delete iconElement.dataset.supermemoryStatus
delete iconElement.dataset.memoriesData
if (iconElement.dataset.originalHtml) {
@@ -659,9 +656,7 @@ async function setupGeminiAutoFetch() {
icons.forEach((icon) => {
const iconElement = icon as HTMLElement
- iconElement
- .querySelector("[data-supermemory-status-badge]")
- ?.remove()
+ iconElement.querySelector("[data-supermemory-status-badge]")?.remove()
delete iconElement.dataset.supermemoryStatus
delete iconElement.dataset.memoriesData
if (iconElement.dataset.originalHtml) {
diff --git a/apps/browser-extension/entrypoints/content/memory-suggestion.ts b/apps/browser-extension/entrypoints/content/memory-suggestion.ts
index 58714c7f..1722e71e 100644
--- a/apps/browser-extension/entrypoints/content/memory-suggestion.ts
+++ b/apps/browser-extension/entrypoints/content/memory-suggestion.ts
@@ -71,7 +71,10 @@ export function showMemorySuggestion(
return suggestionText
}
-export function showLoadingSuggestion(platform: string, input: SuggestionInput) {
+export function showLoadingSuggestion(
+ platform: string,
+ input: SuggestionInput,
+) {
removeMemorySuggestion(platform)
const anchor = getSuggestionAnchor(input)
@@ -134,9 +137,12 @@ function createSuggestionContainer(
}
export function removeMemorySuggestion(platform: string) {
- document
- .querySelectorAll(`[${SUGGESTION_ATTR}="${platform}"]`)
- .forEach((element) => element.remove())
+ const elements = document.querySelectorAll(
+ `[${SUGGESTION_ATTR}="${platform}"]`,
+ )
+ for (const element of elements) {
+ element.remove()
+ }
}
export function acceptMemorySuggestion(
@@ -160,7 +166,9 @@ export function acceptMemorySuggestion(
return true
}
-export function hasAcceptedSupermemoryContext(input: SuggestionInput | null): boolean {
+export function hasAcceptedSupermemoryContext(
+ input: SuggestionInput | null,
+): boolean {
if (!input) return false
const text =
input instanceof HTMLTextAreaElement
@@ -178,7 +186,10 @@ export function syncAcceptedSupermemoryState(input: SuggestionInput | null) {
}
}
-export function clearMemorySuggestion(platform: string, input: SuggestionInput | null) {
+export function clearMemorySuggestion(
+ platform: string,
+ input: SuggestionInput | null,
+) {
removeMemorySuggestion(platform)
if (input?.dataset.supermemories) {
delete input.dataset.supermemories
@@ -194,9 +205,7 @@ export function setMemoryMarkerStatus(
) {
if (!iconElement) return
- iconElement
- .querySelector("[data-supermemory-status-badge]")
- ?.remove()
+ iconElement.querySelector("[data-supermemory-status-badge]")?.remove()
if (status === "neutral" || status === "none") {
delete iconElement.dataset.supermemoryStatus
@@ -227,9 +236,7 @@ export function showMarkerPopover(
memories?: string,
resetAfter = 0,
) {
- iconElement
- .querySelector("[data-supermemory-marker-popover]")
- ?.remove()
+ iconElement.querySelector("[data-supermemory-marker-popover]")?.remove()
ensureSuggestionAnimationStyle()
const popover = document.createElement("div")
diff --git a/apps/browser-extension/entrypoints/content/shared.ts b/apps/browser-extension/entrypoints/content/shared.ts
index 5c56eaa8..07fdcebd 100644
--- a/apps/browser-extension/entrypoints/content/shared.ts
+++ b/apps/browser-extension/entrypoints/content/shared.ts
@@ -77,12 +77,11 @@ export async function saveMemory(
if (response?.success) {
DOMUtils.showToast("success")
return response
- } else {
- DOMUtils.showToast("error")
- return {
- success: false,
- error: response?.error || "Failed to save memory",
- }
+ }
+ DOMUtils.showToast("error")
+ return {
+ success: false,
+ error: response?.error || "Failed to save memory",
}
} catch (error) {
console.error("Error saving memory:", error)
diff --git a/apps/browser-extension/entrypoints/popup/App.tsx b/apps/browser-extension/entrypoints/popup/App.tsx
index 4c5d6aad..c25787a6 100644
--- a/apps/browser-extension/entrypoints/popup/App.tsx
+++ b/apps/browser-extension/entrypoints/popup/App.tsx
@@ -442,7 +442,9 @@ function App() {
throw new Error(response?.error || "Failed to save current page")
} catch (error) {
console.error("Failed to save current page:", error)
- setSaveError(error instanceof Error ? error.message : "Could not save page")
+ setSaveError(
+ error instanceof Error ? error.message : "Could not save page",
+ )
try {
const tabs = await chrome.tabs.query({
diff --git a/apps/browser-extension/entrypoints/welcome/Welcome.tsx b/apps/browser-extension/entrypoints/welcome/Welcome.tsx
index 37670d2c..69756c6d 100644
--- a/apps/browser-extension/entrypoints/welcome/Welcome.tsx
+++ b/apps/browser-extension/entrypoints/welcome/Welcome.tsx
@@ -16,11 +16,7 @@ function Welcome() {