diff --git a/apps/cf-ai-backend/src/helper.ts b/apps/cf-ai-backend/src/helper.ts index dad84a49..c54dde9f 100644 --- a/apps/cf-ai-backend/src/helper.ts +++ b/apps/cf-ai-backend/src/helper.ts @@ -53,7 +53,7 @@ export async function initQuery( "https://gateway.ai.cloudflare.com/v1/47c2b4d598af9d423c06fc9f936226d5/supermemory/openai", compatibility: "strict", }); - selectedModel = openai.chat("gpt-4o"); + selectedModel = openai.chat("gpt-4o-mini"); break; } diff --git a/apps/web/next.config.mjs b/apps/web/next.config.mjs index 7e80d06d..c0001fa5 100644 --- a/apps/web/next.config.mjs +++ b/apps/web/next.config.mjs @@ -19,39 +19,42 @@ if (process.env.NODE_ENV === "development") { })(baseNextConfig); } -export default withSentryConfig(selectedCofig, { - // For all available options, see: - // https://github.com/getsentry/sentry-webpack-plugin#options +export default selectedCofig; - org: "none-h00", - project: "javascript-nextjs", - // Only print logs for uploading source maps in CI - silent: !process.env.CI, +//! Disabled sentry for now because of unreasonably large bundle size +// export default withSentryConfig(selectedCofig, { +// // For all available options, see: +// // https://github.com/getsentry/sentry-webpack-plugin#options - // For all available options, see: - // https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/ +// org: "none-h00", +// project: "javascript-nextjs", +// // Only print logs for uploading source maps in CI +// silent: !process.env.CI, - // Upload a larger set of source maps for prettier stack traces (increases build time) - widenClientFileUpload: true, +// // For all available options, see: +// // https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/ - // Route browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers. - // This can increase your server load as well as your hosting bill. - // Note: Check that the configured route will not match with your Next.js middleware, otherwise reporting of client- - // side errors will fail. - tunnelRoute: "/monitoring", +// // Upload a larger set of source maps for prettier stack traces (increases build time) +// widenClientFileUpload: true, - // Hides source maps from generated client bundles - hideSourceMaps: true, +// // Route browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers. +// // This can increase your server load as well as your hosting bill. +// // Note: Check that the configured route will not match with your Next.js middleware, otherwise reporting of client- +// // side errors will fail. +// tunnelRoute: "/monitoring", - // Automatically tree-shake Sentry logger statements to reduce bundle size - disableLogger: true, +// // Hides source maps from generated client bundles +// hideSourceMaps: true, - // Enables automatic instrumentation of Vercel Cron Monitors. (Does not yet work with App Router route handlers.) - // See the following for more information: - // https://docs.sentry.io/product/crons/ - // https://vercel.com/docs/cron-jobs - automaticVercelMonitors: true, -}); +// // Automatically tree-shake Sentry logger statements to reduce bundle size +// disableLogger: true, + +// // Enables automatic instrumentation of Vercel Cron Monitors. (Does not yet work with App Router route handlers.) +// // See the following for more information: +// // https://docs.sentry.io/product/crons/ +// // https://vercel.com/docs/cron-jobs +// automaticVercelMonitors: true, +// }); // we only need to use the utility during development so we can check NODE_ENV // (note: this check is recommended but completely optional) diff --git a/apps/web/package.json b/apps/web/package.json index ed3eec11..7d97fe7c 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -1,55 +1,53 @@ { - "name": "@repo/web", - "version": "1.0.0", - "private": true, - "packageManager": "yarn@1.22.21", - "scripts": { - "dev": "next dev", - "build": "next build", - "start": "next start", - "lint": "eslint . --max-warnings 0", - "cf-typegen": "wrangler types --env-interface CloudflareEnv env.d.ts", - "pages:build": "npx @cloudflare/next-on-pages", - "preview": "npm run pages:build && wrangler pages dev", - "deploy": "npm run pages:build && wrangler pages deploy --branch main", - "schema-update": "bunx drizzle-kit generate sqlite", - "update-local-db": "bunx wrangler d1 execute dev-d1-anycontext --local", - "update-prod-db": "bunx wrangler d1 execute prod-d1-supermemory --remote" - }, - "dependencies": { - "@million/lint": "^1.0.0-rc.11", - "@radix-ui/react-dialog": "^1.0.5", - "@radix-ui/react-popover": "^1.0.7", - "@radix-ui/react-slot": "^1.1.0", - "@sentry/nextjs": "^8", - "cmdk": "^1.0.0", - "lowlight": "^3.1.0", - "million": "^3.1.6", - "next": "^14.1.1", - "novel": "^0.4.2", - "nuqs": "^1.17.4", - "react": "^18.2.0", - "react-dom": "^18.2.0", - "react-resizable-panels": "^2.0.19", - "use-debounce": "^10.0.1", - "wrangler": "^3.65.0" - }, - "devDependencies": { - "@next/eslint-plugin-next": "^14.1.1", - "@repo/eslint-config": "*", - "@repo/typescript-config": "*", - "@repo/tailwind-config": "*", - "@repo/shared-types": "*", - "@types/eslint": "^8.56.5", - "@types/node": "^20.11.24", - "@types/react": "^18.2.61", - "@types/react-dom": "^18.2.19", - "eslint": "^8.57.0", - "typescript": "^5.3.3" - }, - "trustedDependencies": [ - "esbuild", - "workerd", - "xycolors" - ] + "name": "@repo/web", + "version": "1.0.0", + "private": true, + "packageManager": "yarn@1.22.21", + "scripts": { + "dev": "next dev", + "build": "next build", + "start": "next start", + "lint": "eslint . --max-warnings 0", + "cf-typegen": "wrangler types --env-interface CloudflareEnv env.d.ts", + "pages:build": "npx @cloudflare/next-on-pages", + "preview": "npm run pages:build && wrangler pages dev", + "deploy": "npm run pages:build && wrangler pages deploy --branch main", + "schema-update": "bunx drizzle-kit generate sqlite", + "update-local-db": "bunx wrangler d1 execute dev-d1-anycontext --local", + "update-prod-db": "bunx wrangler d1 execute prod-d1-supermemory --remote" + }, + "dependencies": { + "@radix-ui/react-dialog": "^1.0.5", + "@radix-ui/react-popover": "^1.0.7", + "@radix-ui/react-slot": "^1.1.0", + "@sentry/nextjs": "^8", + "cmdk": "^1.0.0", + "lowlight": "^3.1.0", + "million": "^3.1.6", + "next": "^14.1.1", + "novel": "^0.4.2", + "nuqs": "^1.17.4", + "react": "^18.2.0", + "react-dom": "^18.2.0", + "react-resizable-panels": "^2.0.19", + "use-debounce": "^10.0.1" + }, + "devDependencies": { + "@next/eslint-plugin-next": "^14.1.1", + "@repo/eslint-config": "*", + "@repo/typescript-config": "*", + "@repo/tailwind-config": "*", + "@repo/shared-types": "*", + "@types/eslint": "^8.56.5", + "@types/node": "^20.11.24", + "@types/react": "^18.2.61", + "@types/react-dom": "^18.2.19", + "eslint": "^8.57.0", + "typescript": "^5.3.3" + }, + "trustedDependencies": [ + "esbuild", + "workerd", + "xycolors" + ] } diff --git a/apps/web/sentry.client.config.ts b/apps/web/sentry.client.config.ts index b793a576..8ae9937e 100644 --- a/apps/web/sentry.client.config.ts +++ b/apps/web/sentry.client.config.ts @@ -20,11 +20,5 @@ Sentry.init({ replaysSessionSampleRate: 0.1, // You can remove this option if you're not planning to use the Sentry Session Replay feature: - integrations: [ - Sentry.replayIntegration({ - // Additional Replay configuration goes in here, for example: - maskAllText: true, - blockAllMedia: true, - }), - ], + integrations: [], }); diff --git a/apps/web/wrangler.toml b/apps/web/wrangler.toml index e564b567..ce38285b 100644 --- a/apps/web/wrangler.toml +++ b/apps/web/wrangler.toml @@ -3,7 +3,6 @@ compatibility_date = "2024-03-29" compatibility_flags = [ "nodejs_compat" ] pages_build_output_dir = ".vercel/output/static" - [placement] mode = "smart" diff --git a/bun.lockb b/bun.lockb index 7a31ad59..72168bb9 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index 0216d3f3..5a11d364 100644 --- a/package.json +++ b/package.json @@ -1,114 +1,126 @@ { - "name": "supermemory-ai", - "private": true, - "type": "module", - "scripts": { - "build": "turbo build", - "dev": "turbo dev", - "lint": "turbo lint", - "format": "prettier --write \"**/*.{ts,tsx,md}\"", - "deploy": "turbo deploy" - }, - "devDependencies": { - "@clack/prompts": "^0.7.0", - "@cloudflare/next-on-pages": "1", - "@cloudflare/workers-types": "^4.20240614.0", - "@repo/eslint-config": "*", - "@repo/shared-types": "*", - "@repo/tailwind-config": "*", - "@repo/typescript-config": "*", - "@repo/ui": "*", - "@tailwindcss/typography": "^0.5.13", - "@types/turndown": "^5.0.4", - "autoprefixer": "^10.4.19", - "drizzle-kit": "0.21.2", - "eslint-plugin-next-on-pages": "^1.11.3", - "lint-staged": "^15.2.5", - "postcss": "^8.4.38", - "prettier": "^3.3.3", - "readline-sync": "^1.4.10", - "tailwindcss": "^3.4.3", - "tailwindcss-animate": "^1.0.7", - "turbo": "2.0.3", - "vercel": "^34.2.0" - }, - "engines": { - "node": ">=18" - }, - "packageManager": "bun@1.1.0", - "workspaces": [ - "apps/*", - "packages/*" - ], - "dependencies": { - "@ai-sdk/anthropic": "^0.0.15", - "@ai-sdk/google": "^0.0.15", - "@ai-sdk/openai": "^0.0.14", - "@auth/drizzle-adapter": "^1.1.0", - "@aws-sdk/client-s3": "^3.577.0", - "@aws-sdk/s3-request-presigner": "^3.577.0", - "@babel/plugin-transform-runtime": "^7.24.7", - "@cloudflare/puppeteer": "^0.0.11", - "@headlessui/react": "^2.0.4", - "@heroicons/react": "^2.1.4", - "@hono/swagger-ui": "^0.2.2", - "@hookform/resolvers": "^3.4.2", - "@iarna/toml": "^2.2.5", - "@langchain/cloudflare": "^0.0.6", - "@million/lint": "^1.0.0-rc.18", - "@mozilla/readability": "^0.5.0", - "@radix-ui/react-accordion": "^1.1.2", - "@radix-ui/react-dropdown-menu": "^2.1.1", - "@radix-ui/react-icons": "^1.3.0", - "@radix-ui/react-label": "^2.0.2", - "@radix-ui/react-popover": "^1.1.1", - "@radix-ui/react-progress": "^1.0.3", - "@radix-ui/react-scroll-area": "^1.0.5", - "@radix-ui/react-select": "^2.0.0", - "@radix-ui/react-separator": "^1.0.3", - "@radix-ui/react-slot": "^1.1.0", - "@radix-ui/react-switch": "^1.1.0", - "@radix-ui/react-tabs": "^1.0.4", - "@radix-ui/react-toast": "^1.1.5", - "@radix-ui/react-tooltip": "^1.1.2", - "@tldraw/assets": "^2.2.0", - "cheerio": "^1.0.0-rc.12", - "drizzle-orm": "^0.32.0", - "framer-motion": "^11.3.6", - "geist": "^1.3.1", - "jose": "^5.6.3", - "katex": "^0.16.10", - "lucide-react": "^0.379.0", - "next-app-theme": "^0.1.10", - "next-auth": "^5.0.0-beta.18", - "next-themes": "^0.3.0", - "random-js": "^2.1.0", - "react-dropzone": "^14.2.3", - "react-hook-form": "^7.51.5", - "react-layout-masonry": "^1.1.0", - "react-markdown": "^9.0.1", - "react-responsive-masonry": "^2.2.1", - "react-tweet": "^3.2.1", - "react-use-measure": "^2.1.1", - "react-web-share": "^2.0.2", - "rehype-highlight": "^7.0.0", - "rehype-katex": "^7.0.0", - "remark-gfm": "^4.0.0", - "remark-math": "^6.0.0", - "sonner": "^1.5.0", - "tailwind-scrollbar": "^3.1.0", - "tldraw": "^2.1.4", - "turndown": "^7.2.0", - "uploadthing": "^6.10.4", - "vaul": "^0.9.1", - "wrangler": "3.28.3", - "zod": "^3.23.8" - }, - "trustedDependencies": [ - "core-js-pure", - "es5-ext" - ], - "lint-staged": { - "**/*": "prettier --write --ignore-unknown" - } + "name": "supermemory-ai", + "private": true, + "type": "module", + "scripts": { + "build": "turbo build", + "dev": "turbo dev", + "lint": "turbo lint", + "format": "prettier --write \"**/*.{ts,tsx,md}\"", + "deploy": "turbo deploy" + }, + "devDependencies": { + "@clack/prompts": "^0.7.0", + "@cloudflare/next-on-pages": "1", + "@cloudflare/workers-types": "^4.20240614.0", + "@repo/eslint-config": "*", + "@repo/shared-types": "*", + "@repo/tailwind-config": "*", + "@repo/typescript-config": "*", + "@repo/ui": "*", + "@tailwindcss/typography": "^0.5.13", + "@types/turndown": "^5.0.4", + "autoprefixer": "^10.4.19", + "drizzle-kit": "0.21.2", + "eslint-plugin-next-on-pages": "^1.11.3", + "lint-staged": "^15.2.5", + "postcss": "^8.4.38", + "prettier": "^3.3.3", + "readline-sync": "^1.4.10", + "tailwindcss": "^3.4.3", + "tailwindcss-animate": "^1.0.7", + "turbo": "2.0.3", + "vercel": "^34.2.0" + }, + "engines": { + "node": ">=18" + }, + "packageManager": "yarn@1.22.21", + "workspaces": [ + "apps/*", + "packages/*" + ], + "dependencies": { + "@ai-sdk/anthropic": "^0.0.15", + "@ai-sdk/google": "^0.0.15", + "@ai-sdk/openai": "^0.0.14", + "@auth/drizzle-adapter": "^1.1.0", + "@aws-sdk/client-s3": "^3.577.0", + "@aws-sdk/s3-request-presigner": "^3.577.0", + "@babel/plugin-transform-runtime": "^7.24.7", + "@cloudflare/puppeteer": "^0.0.11", + "@headlessui/react": "^2.0.4", + "@heroicons/react": "^2.1.4", + "@hono/swagger-ui": "^0.2.2", + "@hookform/resolvers": "^3.4.2", + "@iarna/toml": "^2.2.5", + "@langchain/cloudflare": "^0.0.6", + "@million/lint": "^1.0.0-rc.81", + "@mozilla/readability": "^0.5.0", + "@radix-ui/react-accordion": "^1.1.2", + "@radix-ui/react-dropdown-menu": "^2.1.1", + "@radix-ui/react-icons": "^1.3.0", + "@radix-ui/react-label": "^2.0.2", + "@radix-ui/react-popover": "^1.1.1", + "@radix-ui/react-progress": "^1.0.3", + "@radix-ui/react-scroll-area": "^1.0.5", + "@radix-ui/react-select": "^2.0.0", + "@radix-ui/react-separator": "^1.0.3", + "@radix-ui/react-slot": "^1.1.0", + "@radix-ui/react-switch": "^1.1.0", + "@radix-ui/react-tabs": "^1.0.4", + "@radix-ui/react-toast": "^1.1.5", + "@radix-ui/react-tooltip": "^1.1.2", + "@tldraw/assets": "^2.2.0", + "@types/jsonwebtoken": "^9.0.6", + "@types/react-responsive-masonry": "^2.1.3", + "@types/readline-sync": "^1.4.8", + "ai": "^3.1.14", + "aws4fetch": "^1.0.18", + "cheerio": "^1.0.0-rc.12", + "compromise": "^14.13.0", + "crypto-browserify": "^3.12.0", + "drizzle-orm": "0.30.0", + "eslint-config-turbo": "^2.0.6", + "framer-motion": "^11.2.6", + "geist": "^1.3.0", + "google-auth-library": "^9.11.0", + "grammy": "^1.25.1", + "http": "^0.0.1-security", + "https": "^1.0.0", + "jsonwebtoken": "^9.0.2", + "katex": "^0.16.10", + "lucide-react": "^0.379.0", + "million": "^3.1.11", + "next-app-theme": "^0.1.10", + "next-auth": "^5.0.0-beta.18", + "next-themes": "^0.3.0", + "random-js": "^2.1.0", + "react-dropzone": "^14.2.3", + "react-hook-form": "^7.51.5", + "react-layout-masonry": "^1.1.0", + "react-markdown": "^9.0.1", + "react-responsive-masonry": "^2.2.1", + "react-tweet": "^3.2.1", + "react-use-measure": "^2.1.1", + "react-web-share": "^2.0.2", + "rehype-highlight": "^7.0.0", + "rehype-katex": "^7.0.0", + "remark-gfm": "^4.0.0", + "remark-math": "^6.0.0", + "sonner": "^1.5.0", + "tailwind-scrollbar": "^3.1.0", + "tldraw": "^2.1.4", + "turndown": "^7.2.0", + "uploadthing": "^6.10.4", + "vaul": "^0.9.1", + "zod": "^3.23.8" + }, + "trustedDependencies": [ + "core-js-pure", + "es5-ext" + ], + "lint-staged": { + "**/*": "prettier --write --ignore-unknown" + } }