MCPcopy Index your code
hub / github.com/github/copilot-sdk / _register_canvas_handler

Method _register_canvas_handler

python/copilot/session.py:2328–2336  ·  view source on GitHub ↗

Register the canvas handler for this session.

(self, handler: CanvasHandler | None)

Source from the content-addressed store, hash-verified

2326 self._auto_mode_switch_handler = handler
2327
2328 def _register_canvas_handler(self, handler: CanvasHandler | None) -> None:
2329 """Register the canvas handler for this session."""
2330 with self._canvas_handler_lock:
2331 self._canvas_handler = handler
2332 self._client_session_apis.canvas = (
2333 cast(RpcCanvasHandler, _CanvasHandlerAdapter(handler))
2334 if handler is not None
2335 else None
2336 )
2337
2338 def _get_canvas_handler(self) -> CanvasHandler | None:
2339 with self._canvas_handler_lock:

Calls 1