The previous fix (Patch 021) read import.meta.env.VITE_BRIDGE_TOKEN, but Vite only auto-exposes VITE_* in import.meta.env when the .env lives in apps/client/. Our .env is at the monorepo root and is loaded via loadEnv() in vite.config.ts, then injected through the define block under the 'process.env' key. So the runtime variable lives at process.env.VITE_BRIDGE_TOKEN, not import.meta.env.VITE_BRIDGE_TOKEN. Without this, the bridge proxy received no Bearer header and returned 401 Unauthorized for every /database slash command request — exactly what Corentin reported. Patch 023. |
||
|---|---|---|
| .. | ||
| __tests__ | ||
| components | ||
| extension | ||
| hooks | ||
| renderers | ||
| services | ||
| slash-command | ||
| types | ||
| index.ts | ||