diff --git a/apps/web/app/layout.tsx b/apps/web/app/layout.tsx index dfc12a0c..9b4553a8 100644 --- a/apps/web/app/layout.tsx +++ b/apps/web/app/layout.tsx @@ -54,6 +54,7 @@ export default function RootLayout({ "https://api.supermemory.ai" } includeCredentials={true} + headers={{ "X-App-Source": "nova" }} > diff --git a/apps/web/components/settings/account.tsx b/apps/web/components/settings/account.tsx index bb447a6c..30227779 100644 --- a/apps/web/components/settings/account.tsx +++ b/apps/web/components/settings/account.tsx @@ -192,7 +192,6 @@ export default function Account() { const autumn = useCustomer() const [isUpgrading, setIsUpgrading] = useState(false) const [emailConfirm, setEmailConfirm] = useState("") - const [notifyWhenDeleted, setNotifyWhenDeleted] = useState(false) const [isDeleteDialogOpen, setIsDeleteDialogOpen] = useState(false) const [isClosingAccount, setIsClosingAccount] = useState(false) const [switchingOrgId, setSwitchingOrgId] = useState(null) @@ -287,7 +286,6 @@ export default function Account() { try { await deleteUserAccount.mutateAsync({ confirmation: user.email, - notifyOnComplete: notifyWhenDeleted, }) clearActiveOrg() try { @@ -298,7 +296,6 @@ export default function Account() { } setIsDeleteDialogOpen(false) setEmailConfirm("") - setNotifyWhenDeleted(false) window.location.assign("/login/new") } catch (e) { const msg = e instanceof Error ? e.message : "Something went wrong" @@ -701,7 +698,6 @@ export default function Account() { setIsDeleteDialogOpen(open) if (!open) { setEmailConfirm("") - setNotifyWhenDeleted(false) } }} > @@ -909,26 +905,6 @@ export default function Account() { />
- diff --git a/apps/web/hooks/use-account-settings.ts b/apps/web/hooks/use-account-settings.ts index b6eea595..ca2fae62 100644 --- a/apps/web/hooks/use-account-settings.ts +++ b/apps/web/hooks/use-account-settings.ts @@ -20,6 +20,7 @@ export function useAccountMemberships() { queryFn: async () => { const res = await fetch(`${API_BASE}/v3/auth/account/memberships`, { credentials: "include", + headers: { "X-App-Source": "nova" }, }) if (!res.ok) { throw new Error("Failed to load organizations") @@ -41,6 +42,7 @@ export function useLeaveNonOwnerMemberships() { { method: "POST", credentials: "include", + headers: { "X-App-Source": "nova" }, }, ) if (!res.ok) { @@ -73,7 +75,7 @@ export function useDeleteUserAccount() { const res = await fetch(`${API_BASE}/v3/auth/account/delete`, { method: "POST", credentials: "include", - headers: { "Content-Type": "application/json" }, + headers: { "Content-Type": "application/json", "X-App-Source": "nova" }, body: JSON.stringify({ confirmation, ...(notifyOnComplete === true ? { notifyOnComplete: true } : {}), diff --git a/apps/web/public/images/plugins/cursor.png b/apps/web/public/images/plugins/cursor.png new file mode 100644 index 00000000..6e4e95e6 Binary files /dev/null and b/apps/web/public/images/plugins/cursor.png differ diff --git a/packages/lib/api.ts b/packages/lib/api.ts index 169c41e5..f2d13b47 100644 --- a/packages/lib/api.ts +++ b/packages/lib/api.ts @@ -253,6 +253,12 @@ export const apiSchema = createSchema({ export const $fetch = createFetch({ baseURL: `${process.env.NEXT_PUBLIC_BACKEND_URL ?? "https://api.supermemory.ai"}/v3`, credentials: "include", + headers: { "X-App-Source": "nova" }, + onRequest: (context: { headers: Headers }) => { + if (!context.headers.has("X-App-Source")) { + context.headers.set("X-App-Source", "nova") + } + }, retry: { attempts: 3, delay: 100, diff --git a/packages/lib/auth.ts b/packages/lib/auth.ts index 081c1053..ae44e6bd 100644 --- a/packages/lib/auth.ts +++ b/packages/lib/auth.ts @@ -13,6 +13,7 @@ export const authClient = createAuthClient({ baseURL: process.env.NEXT_PUBLIC_BACKEND_URL ?? "https://api.supermemory.ai", fetchOptions: { credentials: "include", + headers: { "X-App-Source": "nova" }, }, plugins: [ usernameClient(),