mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-06-16 01:35:36 -04:00
893cb8254f
sessions.js executes before chat.js in ES module order, so window.chatModule is not yet set when _checkServerStream runs on page load. The resumeStream guard evaluates false and the spinner fallback kicks in; that fallback only polls stream_status and never retries the live-resume path, leaving the user with a dead spinner for the entire duration of the detached agent run. Fix: add a one-shot retry in the polling loop. On the first tick where window.chatModule.resumeStream is available, attempt to attach. If it succeeds, clear the interval and remove the spinner — live SSE streaming takes over. If the run has already finished (404), the loop continues to poll status and calls selectSession on completion. Fixes #3048 Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>