1.5 KiB
1.5 KiB
RetrieX EventSource + Shop Status Fix
Patch-only package.
Purpose
This patch extends the previous stream robustness fix and addresses two issues:
- The chat now shows a visible reason when the Shopware shop/search API is unreachable or returns a system error.
- Reference-probe failures no longer block the actual primary Shopware search request.
Files
-
public/assets/js/base.js- Uses native
EventSourceinstead of a manually parsedfetch().body.getReader()stream. - Starts a short-lived stream job with
POST /ask-jobs, then opensGET /ask-sse/{jobId}.
- Uses native
-
src/Controller/AskSseController.php- Adds
POST /ask-jobs. - Adds
GET /ask-sse/{jobId}for native EventSource streaming. - Keeps the old
POST /ask-sseendpoint as backwards compatibility. - Stores short-lived stream jobs under
var/stream_jobs.
- Adds
-
src/Commerce/ShopSearchService.php- Reference-probe Store API failures are logged but no longer stop the primary search.
- The failure state is reset after a failed reference probe before the primary search starts.
- Retry without commerce history is skipped only after a real primary Store API system failure.
-
src/Agent/AgentRunner.php- If the primary shop search has a Store API system failure, the chat displays:
Shopsystem aktuell nicht erreichbar oder fehlerhaft. Grund: ... - Repair search is skipped after primary Store API system failures.
- If the primary shop search has a Store API system failure, the chat displays:
After installation
Run:
bin/console cache:clear
If OPcache/PHP-FPM is active, reload PHP-FPM afterwards.