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

Method _register_user_input_handler

python/copilot/session.py:2480–2495  ·  view source on GitHub ↗

Register a handler for user input requests. When the agent needs input from the user (via ask_user tool), this handler is called to provide the response. Note: This method is internal. User input handlers are typically registered when creati

(self, handler: UserInputHandler | None)

Source from the content-addressed store, hash-verified

2478 return PermissionDecisionUserNotAvailable()
2479
2480 def _register_user_input_handler(self, handler: UserInputHandler | None) -> None:
2481 """
2482 Register a handler for user input requests.
2483
2484 When the agent needs input from the user (via ask_user tool),
2485 this handler is called to provide the response.
2486
2487 Note:
2488 This method is internal. User input handlers are typically registered
2489 when creating a session via :meth:`CopilotClient.create_session`.
2490
2491 Args:
2492 handler: The user input handler function, or None to remove the handler.
2493 """
2494 with self._user_input_handler_lock:
2495 self._user_input_handler = handler
2496
2497 async def _handle_user_input_request(self, request: dict) -> UserInputResponse:
2498 """

Callers 2

_initialize_sessionMethod · 0.95
resume_sessionMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected