Files
Folo/packages/internal/utils
DIYgod c75533cbd2 fix: report the API as unreachable only when a probe confirms it
One request failing without a response proved little: an endpoint may be slow or
briefly broken while the API itself is fine, and the prompt appeared on every such
hiccup.

- a failed request now only schedules a probe, a cheap `/status/configs` request two
  seconds later, repeated once; the API counts as unreachable when every probe fails
  and no other request got an answer in the meantime
- while unreachable the probe repeats every fifteen seconds so the prompt goes as soon
  as the API answers; any ordinary answer lifts it as well
- the desktop probe travels the same path as its requests, through the main process;
  the mobile probe uses the app's fetch
- without a probe, three failures in a row are needed instead of one

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-18 16:18:30 +08:00
..