feat/ internal eval平台现支持实机联调。 1. 显示当前本地数据库里登录用户的历史聊天,已生成的回忆录。支持在网页直接对话,不依赖手机app。

This commit is contained in:
Kevin
2026-04-20 11:58:32 +08:00
parent 1194e1ed71
commit e848f26354
18 changed files with 1339 additions and 12 deletions

View File

@@ -13,6 +13,11 @@ export default defineConfig(({ mode }) => {
(env.VITE_EVAL_PROXY_TARGET || "").trim() ||
"http://127.0.0.1:7999";
/** 消费者主站 main:app对话 / 回忆录 JWT API默认 :8000 */
const mainApiProxy =
(env.VITE_MAIN_API_PROXY_TARGET || "").trim() ||
"http://127.0.0.1:8000";
return {
plugins: [react()],
server: {
@@ -32,6 +37,24 @@ export default defineConfig(({ mode }) => {
});
},
},
"/api": {
target: mainApiProxy,
changeOrigin: true,
configure: (proxy) => {
proxy.on("error", (err) => {
console.error(
`[vite proxy] /api → ${mainApiProxy} failed:`,
(err as Error).message,
"(请启动主站 API main:app默认 :8000)",
);
});
},
},
"/ws": {
target: mainApiProxy,
ws: true,
changeOrigin: true,
},
},
},
test: {