chore: update live chat and work server changes

This commit is contained in:
2026-04-26 16:37:06 +09:00
parent 63e5d263a7
commit 20a6333ed2
38 changed files with 2078 additions and 2281 deletions

View File

@@ -21,6 +21,16 @@ const VITE_EMPTY_OUT_DIR = processEnv.VITE_EMPTY_OUT_DIR !== 'false';
const VITE_FILTER_PUBLIC_DIR = processEnv.VITE_FILTER_PUBLIC_DIR === 'true';
const VITE_DISABLE_MODULE_PRELOAD = processEnv.VITE_DISABLE_MODULE_PRELOAD === 'true';
const VITE_DISABLE_PWA = processEnv.VITE_DISABLE_PWA === 'true';
const WORK_SERVER_HTTP_TARGET = processEnv.WORK_SERVER_URL?.trim() || 'http://work-server:3100';
const WORK_SERVER_WS_TARGET = (() => {
try {
const parsed = new URL(WORK_SERVER_HTTP_TARGET);
parsed.protocol = parsed.protocol === 'https:' ? 'wss:' : 'ws:';
return parsed.toString();
} catch {
return WORK_SERVER_HTTP_TARGET.replace(/^http/i, 'ws');
}
})();
const ROOT_DIR = fileURLToPath(new URL('.', import.meta.url));
function shouldIgnoreDevUpdatePath(watchedPath: string) {
@@ -150,16 +160,16 @@ export default defineConfig({
},
proxy: {
'/api': {
target: 'http://work-server:3100',
target: WORK_SERVER_HTTP_TARGET,
changeOrigin: true,
},
'/ws/chat': {
target: 'ws://work-server:3100',
target: WORK_SERVER_WS_TARGET,
ws: true,
changeOrigin: true,
},
'/.codex_chat': {
target: 'http://work-server:3100',
target: WORK_SERVER_HTTP_TARGET,
changeOrigin: true,
},
},