mirror of
https://github.com/mudler/LocalAI
synced 2026-05-24 09:28:23 +00:00
useChat now probes /api/conversations on mount. When the endpoint responds 200, the server becomes the authoritative source: the hook merges remote conversations into local state and pushes per-chat PUT updates on each debounced save. When the endpoint 404s - older LocalAI deploys or the feature disabled - the hook silently keeps the old localStorage-only behaviour, so the change is backward-compatible. Migration: when the server is reachable but empty and the browser has local conversations with history, the hook fires a single PUT /api/conversations/bulk to seed the server. The atomic bulk endpoint avoids partial-upload states where a retry would skip already-uploaded entries. Delete operations propagate to the server when it's available; failures are silently swallowed so the local UI stays responsive on transient network errors. Assisted-by: Claude:claude-opus-4-7 Signed-off-by: TLoE419 <tloemizuchizu@gmail.com> |
||
|---|---|---|
| .. | ||
| e2e | ||
| public/locales | ||
| scripts | ||
| src | ||
| bun.lock | ||
| eslint.config.js | ||
| i18next-parser.config.js | ||
| index.html | ||
| package-lock.json | ||
| package.json | ||
| playwright.config.js | ||
| vite.config.js | ||