MCPcopy Create free account
hub / github.com/IBM/mcp-cli / _render_tool_status

Method _render_tool_status

src/mcp_cli/display/manager.py:702–725  ·  view source on GitHub ↗

Render current tool execution status with argument preview.

(self)

Source from the content-addressed store, hash-verified

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

Callers 2

_refresh_loopMethod · 0.95

Calls 2

updateMethod · 0.80

Tested by 1