Render current tool execution status with argument preview.
(self)
| 700 | self._last_reasoning_preview = "\n".join(preview_lines) |
| 701 | |
| 702 | async def _render_tool_status(self) -> None: |
| 703 | """Render current tool execution status with argument preview.""" |
| 704 | if not self.tool_execution: |
| 705 | return |
| 706 | |
| 707 | # Acquire lock to prevent simultaneous rendering with streaming |
| 708 | async with self._render_lock: |
| 709 | # Update spinner |
| 710 | self._spinner_index = (self._spinner_index + 1) % len(self._spinner_frames) |
| 711 | spinner = self._spinner_frames[self._spinner_index] |
| 712 | |
| 713 | elapsed = time.time() - self.tool_execution.start_time |
| 714 | |
| 715 | # Render status using renderer |
| 716 | status = render_tool_execution_status(self.tool_execution, spinner, elapsed) |
| 717 | |
| 718 | # Only update if changed |
| 719 | if status != self._last_status: |
| 720 | # Update live status display if active |
| 721 | if self._tool_status: |
| 722 | self._tool_status.update(status) |
| 723 | |
| 724 | self._last_status = status |
| 725 | self._last_line_count = 1 # Tool status is always single line |
| 726 | |
| 727 | def _show_final_response( |
| 728 | self, content: str, elapsed: float, interrupted: bool |