v0.4.6: kb improvements, posthog fixes

This commit is contained in:
Waleed
2025-10-05 21:48:32 -07:00
committed by GitHub
3 changed files with 1 additions and 7 deletions

View File

@@ -265,9 +265,8 @@ async function handleS3PresignedUrl(
)
}
// For chat images, knowledge base files, and profile pictures, use direct URLs since they need to be accessible by external services
const finalPath =
uploadType === 'chat' || uploadType === 'knowledge-base' || uploadType === 'profile-pictures'
uploadType === 'chat' || uploadType === 'profile-pictures'
? `https://${config.bucket}.s3.${config.region}.amazonaws.com/${uniqueKey}`
: `/api/files/serve/s3/${encodeURIComponent(uniqueKey)}`

View File

@@ -89,7 +89,6 @@ export const env = createEnv({
TELEMETRY_ENDPOINT: z.string().url().optional(), // Custom telemetry/analytics endpoint
COST_MULTIPLIER: z.number().optional(), // Multiplier for cost calculations
LOG_LEVEL: z.enum(['DEBUG', 'INFO', 'WARN', 'ERROR']).optional(), // Minimum log level to display (defaults to ERROR in production, DEBUG in development)
POSTHOG_ENABLED: z.boolean().optional(), // Enable PostHog analytics and session recording
// External Services
BROWSERBASE_API_KEY: z.string().min(1).optional(), // Browserbase API key for browser automation

View File

@@ -239,10 +239,6 @@ const nextConfig: NextConfig = {
return redirects
},
async rewrites() {
if (!isTruthy(env.POSTHOG_ENABLED)) {
return []
}
return [
{
source: '/ingest/static/:path*',