1.4 KiB
1.4 KiB
RetrieX SSE running reconnect / final cleanup fix
Patch-only fix for the streamed answer UI after the job-based SSE flow.
Problem
After introducing stream jobs, an EventSource reconnect to an already running job could receive:
retry: 15000
: duplicate-or-finished-stream
event: done
data: [DONE]
Because running jobs were treated like harmless duplicate/finished streams, the browser could finalize an incomplete answer as if it had completed successfully. In addition, the final done cleanup still used the streaming cleanup path, which can keep the last .think block visible.
Changes
runningduplicate/reconnect streams are no longer silently closed as successful[DONE]completions.- Only already
completedduplicate streams are silently closed withdone. - A reconnect to a still-running job now follows the existing explicit error path, so the UI can show a clear interruption message instead of silently accepting a partial answer.
- Final stream completion now removes all
.thinkblocks and the loader class.
Changed files
src/Controller/AskSseController.phppublic/assets/js/base.js
After installing
Run:
php bin/console cache:clear
php bin/console mto:agent:config:validate
php bin/console mto:agent:regression:test
Also hard-refresh the browser or clear browser cache because public/assets/js/base.js is client-side JavaScript.