stream the reply: first ink ~1.4s after commit (was ~4s+)
- oracle: gpt-5.4-mini + --no-tools (reads handwriting as well as gpt-5.5, streams ~3x sooner, measured via pi rpc bench); deliver each completed sentence as it streams, drop the sender on agent_end (disconnect = done). - extract_assistant_text: read only the FIRST assistant section of an event — message_update lines carry the partial twice (assistantMessageEvent.partial + top-level message) and would double every streamed chunk; agent_end's messages array is no longer used for text (it concatenates the whole session's messages from turn 2 on). - main: ask the oracle when the ink commits, so the model streams during the drink dissolve; streamed continuation chunks splice into the running write animation on new lines (WritePlan.next_y). - ink: downscale to <=800px long side (adaptive, min 2x), fast PNG deflate. - log time from ask to first delivered chunk. Measured on device, full takeover, 2-turn session: first chunk +1461ms / +1319ms after ask; replies clean and in character on both turns.
M
Maxime Rivest committed
1becc60c9ef0c196c8aa86de88d330b240b3adfa
Parent: f817a27