Chat already renders streamed deltas, but there's perceptible latency between the gateway emitting event:"agent" frames and pixels moving. Goal: the moment the model starts talking, the UI does too.
Where to look
data/network/ws/ChatSession.kt — demuxes agent frames into ChunkEvents
ui/chat/ChatViewModel.kt — accumulates TextDeltas
- Compose recomposition frequency vs per-delta emission (batching?
snapshotFlow? throttle window?)
Acceptance criteria
Chat already renders streamed deltas, but there's perceptible latency between the gateway emitting
event:"agent"frames and pixels moving. Goal: the moment the model starts talking, the UI does too.Where to look
data/network/ws/ChatSession.kt— demuxes agent frames intoChunkEventsui/chat/ChatViewModel.kt— accumulatesTextDeltassnapshotFlow? throttle window?)Acceptance criteria