AstrBot-Desktop/crates
YokiiroBW 64dab459fc
一些检测仍在等待运行
ci / Portable quality checks (push) Waiting to run
ci / Windows Tauri build (push) Waiting to run
fix(protocol): keep every segment of a segmented reply
A `streaming: false` plain frame carries a whole segment, not a fragment
of one, but the mapper appended it to the open accumulation and then
`complete` assigned its own text over the top. A reply that arrived in
three parts was shown as one bubble holding only whichever part
`complete` restated; the rest was never displayed and never stored.

Non-streaming frames now become messages of their own, and `complete`
reconciles instead of overwriting. Three ordered cases, none of which can
lose text the client has seen: the frame extends what was shown byte for
byte, so only the tail is emitted (the streaming case the existing
reconcile test pins); the frame restates text already shown, compared
with whitespace squeezed, so nothing is emitted; or the frame diverges
from what was shown, so both are kept and the frame's text opens its own
message. Tracking that needs the whole stream's delivered text, since
`accumulated` empties as each message closes.

Also stops emitting deltas with no message id. Metadata without one makes
the client fall back to `event_id`, which is unique per event, so each
such delta became a message of its own — and AstrBot does not always put
an id on the opening frames of a stream. The stream id is stable across
exactly the span that needs one name. This is the mapper half of N-4; the
duplicate-bubble report is not yet confirmed to be this, and the client's
own `messageId || eventId` fallback is untouched.

Protocol tests 12 -> 17. All five new assertions were confirmed to fail
under a deliberate regression.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-27 05:40:47 +08:00
..
desktop-protocol fix(protocol): keep every segment of a segmented reply 2026-07-27 05:40:47 +08:00
mock-gateway test(p00): add frontend browser rust and windows checks 2026-07-18 20:42:40 +08:00