diff --git a/src/frontend/src/pages/ChatAppPage/components/ChatPanne.tsx b/src/frontend/src/pages/ChatAppPage/components/ChatPanne.tsx index 6539a1032..7b5f345bf 100644 --- a/src/frontend/src/pages/ChatAppPage/components/ChatPanne.tsx +++ b/src/frontend/src/pages/ChatAppPage/components/ChatPanne.tsx @@ -644,7 +644,7 @@ const useWebsocket = (chatId, flow, setChatHistory, queryString, version) => { if ([1005, 1008].includes(event.code)) { console.warn('即将废弃 :>> '); - setInputState({ lock: true, errorMsg: '' }); + setInputState({ lock: true, errorMsg: event.reason }); } else { if (event.reason) { setErrorData({ title: event.reason }); diff --git a/src/frontend/vite.config.ts b/src/frontend/vite.config.ts index c6376e4bb..96703a68a 100644 --- a/src/frontend/vite.config.ts +++ b/src/frontend/vite.config.ts @@ -6,7 +6,6 @@ import svgr from "vite-plugin-svgr"; const apiRoutes = ["^/api/", "/health"]; // Use environment variable to determine the target. -// const target = process.env.VITE_PROXY_TARGET || "http://192.168.106.120:3003"; const target = process.env.VITE_PROXY_TARGET || "http://127.0.0.1:7860"; const proxyTargets = apiRoutes.reduce((proxyObj, route) => { @@ -17,8 +16,9 @@ const proxyTargets = apiRoutes.reduce((proxyObj, route) => { secure: false, ws: true, }; + // 文件服务地址 proxyObj['/bisheng'] = { - target: "http://110.16.193.170:50061", + target: "http://127.0.0.1", changeOrigin: true, withCredentials: true, secure: false