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

Method __init__

src/mcp_cli/chat/streaming_handler.py:228–246  ·  view source on GitHub ↗

Initialize handler. Args: display: The unified display manager (required, no fallback) runtime_config: Runtime configuration (optional, will load defaults if not provided) dashboard_bridge: Optional DashboardBridge for live token streaming to browser.

(
        self,
        display: StreamingDisplayManager,
        runtime_config: RuntimeConfig | None = None,
        dashboard_bridge: "DashboardBridge | None" = None,
    )

Source from the content-addressed store, hash-verified

226 """
227
228 def __init__(
229 self,
230 display: StreamingDisplayManager,
231 runtime_config: RuntimeConfig | None = None,
232 dashboard_bridge: "DashboardBridge | None" = None,
233 ):
234 """Initialize handler.
235
236 Args:
237 display: The unified display manager (required, no fallback)
238 runtime_config: Runtime configuration (optional, will load defaults if not provided)
239 dashboard_bridge: Optional DashboardBridge for live token streaming to browser.
240 """
241 self.display = display
242 self.tool_accumulator = ToolCallAccumulator()
243 self._interrupted = False
244 self._usage: dict[str, int] | None = None
245 self.runtime_config = runtime_config or load_runtime_config()
246 self._dashboard_bridge = dashboard_bridge
247
248 async def stream_response(
249 self,

Callers

nothing calls this directly

Calls 2

load_runtime_configFunction · 0.90
ToolCallAccumulatorClass · 0.85

Tested by

no test coverage detected