move tokens to config
This commit is contained in:
42
PATCH_README_EVENTSOURCE_SHOP_STATUS_FIX.md
Normal file
42
PATCH_README_EVENTSOURCE_SHOP_STATUS_FIX.md
Normal file
@@ -0,0 +1,42 @@
|
||||
# RetrieX EventSource + Shop Status Fix
|
||||
|
||||
Patch-only package.
|
||||
|
||||
## Purpose
|
||||
|
||||
This patch extends the previous stream robustness fix and addresses two issues:
|
||||
|
||||
1. The chat now shows a visible reason when the Shopware shop/search API is unreachable or returns a system error.
|
||||
2. Reference-probe failures no longer block the actual primary Shopware search request.
|
||||
|
||||
## Files
|
||||
|
||||
- `public/assets/js/base.js`
|
||||
- Uses native `EventSource` instead of a manually parsed `fetch().body.getReader()` stream.
|
||||
- Starts a short-lived stream job with `POST /ask-jobs`, then opens `GET /ask-sse/{jobId}`.
|
||||
|
||||
- `src/Controller/AskSseController.php`
|
||||
- Adds `POST /ask-jobs`.
|
||||
- Adds `GET /ask-sse/{jobId}` for native EventSource streaming.
|
||||
- Keeps the old `POST /ask-sse` endpoint as backwards compatibility.
|
||||
- Stores short-lived stream jobs under `var/stream_jobs`.
|
||||
|
||||
- `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.
|
||||
|
||||
## After installation
|
||||
|
||||
Run:
|
||||
|
||||
```bash
|
||||
bin/console cache:clear
|
||||
```
|
||||
|
||||
If OPcache/PHP-FPM is active, reload PHP-FPM afterwards.
|
||||
Reference in New Issue
Block a user