MCPcopy
hub / github.com/langchain-ai/deepagents / start

Method start

libs/code/deepagents_code/non_interactive.py:125–146  ·  view source on GitHub ↗

Start the spinner with the given message. No-op if the spinner is already running. Fails silently if the console cannot support live display. Args: message: Status text to display next to the spinner.

(self, message: str = "Working...")

Source from the content-addressed store, hash-verified

123 self._live: Live | None = None
124
125 def start(self, message: str = "Working...") -> None:
126 """Start the spinner with the given message.
127
128 No-op if the spinner is already running. Fails silently if the console
129 cannot support live display.
130
131 Args:
132 message: Status text to display next to the spinner.
133 """
134 if self._live is not None:
135 return
136 renderable = RichSpinner(
137 "dots",
138 text=Text(f" {message}", style="dim"),
139 style="dim",
140 )
141 try:
142 self._live = Live(renderable, console=self._console, transient=True)
143 self._live.start()
144 except (AttributeError, TypeError, OSError) as exc:
145 logger.warning("Spinner start failed: %s", exc)
146 self._live = None
147
148 def stop(self) -> None:
149 """Stop the spinner if running. Can be restarted with `start`."""

Callers 4

_process_message_chunkFunction · 0.45
_process_rubric_eventFunction · 0.45
_stream_agentFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected