mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
83af6b8530
Introduces showcase/shell/src/lib/runtime-config.ts (server-only — imports next/cache and is read at request time by the root layout) plus runtime-config.client.ts (reads window.__SHOWCASE_CONFIG__ injected by the layout). Shell's RuntimeConfig contains baseUrl and posthogHost. getRuntimeConfigEdge() provides the Edge-runtime variant for middleware (skips unstable_noStore). Adds vitest config + dev deps to package.json and red-green tests for both modules. Tests verify env-vs-fallback precedence, trailing-slash stripping, no-module-load-freeze (live process.env reads per call), and the Edge wrapper's noStore-skip behavior. Refs plan-B §B7.
1.5 KiB
1.5 KiB