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> |
||
|---|---|---|
| .. | ||
| auth | ||
| endpoints | ||
| middleware | ||
| react-ui | ||
| routes | ||
| static | ||
| views | ||
| app.go | ||
| app_test.go | ||
| csrf_multipart_test.go | ||
| explorer.go | ||
| http_suite_test.go | ||
| openresponses_test.go | ||
| render.go | ||
| route_coverage_test.go | ||