Fix SSE reliability and message delivery for production environments (#85)

* Switch to sync prompt endpoint for reliable message delivery

Use the synchronous /message endpoint instead of /prompt_async to ensure
the UI receives authoritative response data. This matches OpenCode TUI
behavior and prevents message desync during sub-agent tasks.

* Add SSE heartbeat to prevent Cloudflare 524 timeout
This commit is contained in:
Chris Scott authored and GitHub committed 2026-01-27 09:50:15 -05:00
1 parent d78bb120ed
commit a05535e0ef
6 files changed
+61 -10

No files matched your search

+1
View File
@@ -47,6 +47,7 @@ export const DEFAULTS = {
RECONNECT_DELAY_MS: 1000,
MAX_RECONNECT_DELAY_MS: 30000,
IDLE_GRACE_PERIOD_MS: 5000,
HEARTBEAT_INTERVAL_MS: 60000,
},
} as const