diff --git a/AI_AGENT.md b/AI_AGENT.md index d3366ab..d1b7798 100644 --- a/AI_AGENT.md +++ b/AI_AGENT.md @@ -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. +**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) The application calls the Anthropic API via a proxy to avoid CORS issues. * **Location:** `src/lib/api.js`.