Open-source, secure environment with real-world tools for enterprise-grade agents.
Python agentaiai-agentai-agentscode-interpretercopilotdevelopmentdevtoolsgptgpt-4javascriptllmnextjsopenaipythonreactsoftwaretypescript
more cleanup
ErikKaumkb91bc6d80ea7
diff --git a/apps/docs/next.config.mjs b/apps/docs/next.config.mjsindex 3c0fb56f6..28e6f5a1b 100644--- a/apps/docs/next.config.mjs+++ b/apps/docs/next.config.mjs@@ -47,34 +47,35 @@ const codeSnippetsDir = path.resolve('./src/code')/** @type {import('next').NextConfig} */const nextConfig = {pageExtensions: ['js', 'jsx', 'ts', 'tsx', 'mdx'],+ basePath: '/docs',webpack: config => {const codeFilesHash = getFilesHash(codeSnippetsDir)config.cache.version = config.cache.version + delimiter + codeFilesHashreturn config},- // async rewrites() {- // return {- // afterFiles: [- // {- // source: '/ingest/:path*',- // destination: 'https://app.posthog.com/:path*',- // // BEWARE: setting basePath will break the analytics proxy- // },- // { source: '/:path*', destination: '/_404/:path*' },- // ]- // }+ async rewrites() {+ return {+ afterFiles: [+ {+ source: '/ingest/:path*',+ destination: 'https://app.posthog.com/:path*',+ // BEWARE: setting basePath will break the analytics proxy+ },+ { source: '/:path*', destination: '/_404/:path*' },+ ]+ }- // },- // async redirects() {- // return [- // {- // source: '/',- // destination: '/docs',- // permanent: false,- // basePath: false,- // },- // ]- // },+ },+ async redirects() {+ return [+ {+ source: '/',+ destination: '/docs',+ permanent: false,+ basePath: false,+ },+ ]+ },}export default withSearch(diff --git a/apps/docs/src/app/(docs)/docs/pricing/SwitchToProButton.tsx b/apps/docs/src/app/(docs)/docs/pricing/SwitchToProButton.tsxindex ca73cccc4..0c9de76f4 100644--- a/apps/docs/src/app/(docs)/docs/pricing/SwitchToProButton.tsx+++ b/apps/docs/src/app/(docs)/docs/pricing/SwitchToProButton.tsx@@ -71,6 +71,8 @@ function SwitchTierButton() {<TierActiveTag />)}++{user.pricingTier.id !== tiers.pro.id && (<ButtononClick={createCheckoutSession}@@ -87,4 +89,4 @@ function SwitchTierButton() {)}-export default SwitchTierButton\ No newline at end of file+export default SwitchTierButtondiff --git a/apps/docs/src/app/(docs)/docs/pricing/promo/route.ts b/apps/docs/src/app/(docs)/docs/pricing/promo/route.tsindex 8cfa87b57..e0b7af912 100644--- a/apps/docs/src/app/(docs)/docs/pricing/promo/route.ts+++ b/apps/docs/src/app/(docs)/docs/pricing/promo/route.ts@@ -1,20 +1,11 @@import { NextResponse as Response } from 'next/server'import { createClient } from '@supabase/supabase-js'-// const NEXT_PUBLIC_SUPABASE_URL = 'http://127.0.0.1:54321'-// const SUPABASE_SERVICE_ROLE_KEY = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6InNlcnZpY2Vfcm9sZSIsImV4cCI6MTk4MzgxMjk5Nn0.EGIM96RAZx35lJzdJsyH-qQwv8Hdp7fsn3W0YpN81IU'--const supabase = createClient(process.env.NEXT_PUBLIC_SUPABASE_URL!,process.env.SUPABASE_SERVICE_ROLE_KEY!,)-// const supabase = createClient(-// NEXT_PUBLIC_SUPABASE_URL,-// SUPABASE_SERVICE_ROLE_KEY,-// )-export const dynamic = 'force-dynamic' // defaults to force-staticexport async function POST(request: Request) {// Read json data from requestdiff --git a/apps/docs/src/utils/useUser.tsx b/apps/docs/src/utils/useUser.tsxindex d591f21b3..408b70885 100644--- a/apps/docs/src/utils/useUser.tsx+++ b/apps/docs/src/utils/useUser.tsx@@ -102,20 +102,12 @@ export const CustomUserContextProvider = (props) => {if (!session.user.id) return- const { data: userTeams } = await supabase- .from('users_teams')- .select('teams (id, name, is_default, tier, email)')- .eq('user_id', session?.user.id)-- // console.log('info', info)-// @ts-ignore- // const { data: userTeams, teamsError } = await supabase- // .from('users_teams')- // .select('teams (id, name, is_default, tier, email, team_billing (credit_card_added))')- // .eq('user_id', session?.user.id) // Due to RLS, we could also safely just fetch all, but let's be explicit for sure+ const { data: userTeams, teamsError } = await supabase+ .from('users_teams')+ .select('teams (id, name, is_default, tier, email, team_billing (credit_card_added))')+ .eq('user_id', session?.user.id) // Due to RLS, we could also safely just fetch all, but let's be explicit for sure- const teamsError = nullif (teamsError) Sentry.captureException(teamsError)// TODO: Adjust when user can be part of multiple teams// @ts-ignore