Commit 476b1cc
authored
fix: split streamed message segments around tool boundaries (#339)
## Summary
- split text and thinking segments when tool events interrupt a streamed
assistant turn
- assign new message ids for resumed text and thinking segments so
persistence matches the original stream order
- add regression coverage for text -> tool -> text and thinking -> tool
-> thinking flows
## Testing
- cargo test -p aionui-conversation stream_relay -- --nocapture
- cargo clippy -p aionui-conversation -- -D warnings
- cargo fmt --all
- just push -u origin zk/fix/backend-stream-message-segmentation
Co-authored-by: zk <>1 parent eaa3aa0 commit 476b1cc
1 file changed
Lines changed: 394 additions & 131 deletions
0 commit comments