docs: document global disablement of PocketBase auto-cancellation in AI_AGENT.md
This commit is contained in:
@@ -35,6 +35,8 @@ All persistent data lives in **PocketBase**. The data access layer is in `src/li
|
|||||||
|
|
||||||
**Important:** All `db.js` functions are `async`. Always `await` them — omitting `await` will silently pass a Promise where data is expected.
|
**Important:** All `db.js` functions are `async`. Always `await` them — omitting `await` will silently pass a Promise where data is expected.
|
||||||
|
|
||||||
|
**Auto-Cancellation:** The PocketBase JS SDK has auto-cancellation enabled by default. This causes concurrent identical requests (like `db.getTopics()` during React StrictMode renders or concurrent Promise.all) to abort with `ClientResponseError 0`. This feature is **globally disabled** in `src/lib/pb.js` via `pb.autoCancellation(false)` to prevent UI crashes during concurrent fetching.
|
||||||
|
|
||||||
## 3. The AI Integration (Anthropic)
|
## 3. The AI Integration (Anthropic)
|
||||||
The application calls the Anthropic API via a proxy to avoid CORS issues.
|
The application calls the Anthropic API via a proxy to avoid CORS issues.
|
||||||
* **Location:** `src/lib/api.js`.
|
* **Location:** `src/lib/api.js`.
|
||||||
|
|||||||
Reference in New Issue
Block a user