chore: complete clean Agent Desk source snapshot

This commit is contained in:
2026-10-16 12:03:16 +00:00
parent 756ae33d05
commit e57610a27c
123 changed files with 37513 additions and 0 deletions

51
web/next.config.ts Normal file
View File

@@ -0,0 +1,51 @@
import type { NextConfig } from "next"
import { PHASE_DEVELOPMENT_SERVER } from "next/constants"
const backendBaseUrl =
process.env.NEXT_API_BASE_URL?.trim() ||
process.env.NEXT_PUBLIC_API_BASE_URL?.trim() ||
"http://127.0.0.1:8083"
const productionBasePath = ""
export default function nextConfig(phase: string): NextConfig {
const config: NextConfig = {
output: "export",
basePath: productionBasePath,
assetPrefix: `${productionBasePath}/`,
trailingSlash: false,
devIndicators: false,
reactStrictMode: false,
}
if (phase !== PHASE_DEVELOPMENT_SERVER) {
return config
}
return {
...config,
async rewrites() {
return [
{
source: "/support/docs/:slug+",
destination: "/support/docs",
},
{
source: "/support/community/posts/:id(\\d+)",
destination: "/support/community/posts/detail?id=:id",
},
{
source: "/support/community/categories/:slug",
destination: "/support/community/categories?category=:slug",
},
{
source: "/api/:path*",
destination: `${backendBaseUrl}/api/:path*`,
},
{
source: "/storage/:path*",
destination: `${backendBaseUrl}/storage/:path*`,
},
]
},
}
}