AstrBot-Desktop/src-tauri
YokiiroBW c4c40bd561 fix(astrbot): do not resend messages after the response starts
`should_retry_astrbot` treated every `reqwest::Error` as retryable, but that
class covers both "the POST never left" and "the response body broke". `POST
/api/v1/chat` carries no idempotency key, so retrying the second case appended
the user's message to the remote conversation a second time, produced a second
answer, and interleaved the two attempts' deltas into one garbled bubble.

Retries are now limited to connect-phase failures, the one case where the
request provably never reached the server. Anything after that surfaces a
`streamInterrupted` code so the UI can offer a manual retry instead.

Also stops a send from checking the client out of its slot. The other five slot
commands read the client and report "not connected" when it is absent, so a
send disabled sessions, capabilities, upload, download, and session switching
for its whole duration. That window used to be bounded by the client's 120s
total timeout; now that streaming has no total deadline it would last as long
as the reply, so an ordinary long answer would disable the rest of the slot.
The client is cloned instead and concurrent sends are rejected with `slotBusy`.
(P2-13 / F-49, pulled forward from batch R7 because this batch is what made it
user-visible.)

Refs P1-2 / F-12.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-26 23:12:57 +08:00
..
capabilities fix(tauri): grant desktop-pet capability 2026-07-26 22:28:35 +08:00
icons feat(p00): add Tauri desktop spike foundation 2026-07-18 20:34:47 +08:00
src fix(astrbot): do not resend messages after the response starts 2026-07-26 23:12:57 +08:00
tests test(p00): add frontend browser rust and windows checks 2026-07-18 20:42:40 +08:00
build.rs feat(p00): add Tauri desktop spike foundation 2026-07-18 20:34:47 +08:00
Cargo.toml feat(p00): add Tauri desktop spike foundation 2026-07-18 20:34:47 +08:00
tauri.conf.json fix(tauri): allow blob images in production csp 2026-07-26 22:28:35 +08:00