(chunk: str)
| 1161 | start = time.monotonic() |
| 1162 | |
| 1163 | def on_text_chunk(chunk: str) -> None: |
| 1164 | self._emit({ |
| 1165 | "type": "stream_event", |
| 1166 | "session_id": self.session_id, |
| 1167 | "event": { |
| 1168 | "type": "content_block_delta", |
| 1169 | "delta": {"type": "text_delta", "text": chunk}, |
| 1170 | }, |
| 1171 | }) |
| 1172 | |
| 1173 | def on_thinking_chunk(chunk: str) -> None: |
| 1174 | # Live reasoning deltas → a separate thinking delta the TUI renders |