AstrBot-Desktop/src
YokiiroBW 33ac5a3ba8
一些检测仍在等待运行
ci / Portable quality checks (push) Waiting to run
ci / Windows Tauri build (push) Waiting to run
fix(protocol): reconcile restated blocks instead of re-showing them
Repairs two commits that I pushed with a failing gate.

64dab45 treated every `streaming: false` plain frame as a new segment.
That is wrong half the time: AstrBot sends both a block that restates
what the delta stream already carried and a block carrying text the
deltas never delivered, sometimes in the same reply — which is exactly
what the frame-trace fixtures in astrbot_client.rs were built to tell
apart, and I had written those fixtures myself. Treating a restatement as
new content would have shown it twice, and completing each block on
arrival left the two R2 sentinels with no open message to finalize, so a
truncated body and a cancellation both reported "stop".

Both the non-streaming plain frames and the complete frame now go through
one `reconcile`: emit only the byte-exact tail beyond what was shown, or
nothing if the text has already been shown allowing for different
whitespace, or open a message of its own if it diverges. Fixes a real
defect this exposed in `adopt_message_id`, which assigned the server's
bare id back over an active id that carried a reopen suffix, merging
blocks that had just been separated.

9b2ec64 added petEntry.test.ts importing node:fs. tsconfig.app.json sets
an explicit `types` array so Node globals are absent, and typecheck and
build both failed. Now imported as raw text through vite, rather than
adding Node's types to the compilation that covers the browser code.

Protocol tests 12 -> 19. Every new assertion was checked against a
deliberate regression, and the two that survived their first check —
dropping the byte-exact prefix case and dropping the whitespace-only
guard — now have tests that fail without them.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-27 05:49:49 +08:00
..
features fix(protocol): reconcile restated blocks instead of re-showing them 2026-07-27 05:49:49 +08:00
lib fix(tauri): grant the window controls the permissions they call 2026-07-27 01:19:42 +08:00
pages refactor(ui): share ipc error formatting 2026-07-26 22:31:16 +08:00
test fix(ui): release tauri event listeners on unmount 2026-07-27 00:23:42 +08:00
types feat(desktop): complete Q9 chat and stability increment 2026-07-21 14:43:14 +08:00
App.test.tsx feat(profiles): reduce the connection form to what a connection needs 2026-07-27 01:41:42 +08:00
App.tsx fix(pet): read stored preferences and stop the pet from stealing focus 2026-07-27 05:25:27 +08:00
main.tsx feat(p00): add Tauri desktop spike foundation 2026-07-18 20:34:47 +08:00
styles.css fix(pet): show the floating pet, and take the card out from behind it 2026-07-27 04:13:32 +08:00
vite-env.d.ts feat(p00): add Tauri desktop spike foundation 2026-07-18 20:34:47 +08:00