PR #543: chat UIX/UX fixes — thinking indicators, message dedup, streaming stability (JohnGuidry)
Addresses #572 (double chat responses) + #561 (stuck Thinking indicator). Adds optimistic-message-reinject hook, vite loadEnv→process.env bridge for SSR bearer token, dedup + streaming stability. eslint --fix on touched files (net lint errors 1700→1588). Build GREEN, test 33 fail/694 pass (zero regressions).
This commit is contained in:
@@ -88,6 +88,15 @@ async function isClaudeAgentHealthy(port = 8642): Promise<boolean> {
|
||||
|
||||
const config = defineConfig(({ mode, command }) => {
|
||||
const env = loadEnv(mode, process.cwd(), '')
|
||||
// Bridge loadEnv into process.env for server-side SSR runtime code that
|
||||
// reads env vars directly from process.env (e.g. getBearerToken() in
|
||||
// openai-compat-api.ts reads process.env.HERMES_API_TOKEN). Without this,
|
||||
// Vite's loadEnv only populates the local `env` object — not process.env.
|
||||
for (const key of Object.keys(env)) {
|
||||
if (!(key in process.env)) {
|
||||
process.env[key] = env[key]
|
||||
}
|
||||
}
|
||||
const claudeApiUrl = env.CLAUDE_API_URL?.trim() || 'http://127.0.0.1:8642'
|
||||
// /api/connection-status is handled by the real route file at
|
||||
// src/routes/api/connection-status.ts; the dev server no longer
|
||||
|
||||
Reference in New Issue
Block a user