feat: add project-aware agent workspace
Generic Container CI/CD / test-build-publish (push) Successful in 2m9s
Frontend CI/CD / build-test-publish-and-deploy (push) Successful in 2m39s

This commit is contained in:
2026-10-22 18:52:18 +08:00
parent c6a0e74e72
commit 2d8506fea0
191 changed files with 12373 additions and 3556 deletions
+11 -1
View File
@@ -5,6 +5,7 @@ import { fileURLToPath, URL } from "node:url";
import { createEdgeTtsMiddleware } from "./server/edge-tts-service";
const RUNTIME_CONFIG_PATH = "/runtime-config.js";
const PERIPHERAL_PROXY_PATH = "/peripheral";
function renderRuntimeConfig(values: Record<string, string>) {
const config = {
@@ -57,12 +58,21 @@ function runtimeConfigPlugin(values: Record<string, string>): Plugin {
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), "");
const peripheralProxy = {
[PERIPHERAL_PROXY_PATH]: {
target: env.TJWATER_PERIPHERAL_SAMPLE_UPSTREAM || "http://127.0.0.1:8011",
changeOrigin: false,
rewrite: (path: string) => path.slice(PERIPHERAL_PROXY_PATH.length) || "/"
}
};
return {
plugins: [runtimeConfigPlugin(env), react(), tailwindcss({ optimize: false })],
server: {
allowedHosts: ["next.demo.waternetwork.cn"]
allowedHosts: ["next.demo.waternetwork.cn"],
proxy: peripheralProxy
},
preview: { proxy: peripheralProxy },
cacheDir: process.env.TJWATER_VITE_CACHE_DIR ?? "node_modules/.vite",
resolve: {
dedupe: ["react", "react-dom"],