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

Method _register_commands

python/copilot/session.py:2268–2279  ·  view source on GitHub ↗

Register command handlers for this session. Args: commands: A list of CommandDefinition objects, or None to clear all commands.

(self, commands: list[CommandDefinition] | None)

Source from the content-addressed store, hash-verified

2266 )
2267
2268 def _register_commands(self, commands: list[CommandDefinition] | None) -> None:
2269 """Register command handlers for this session.
2270
2271 Args:
2272 commands: A list of CommandDefinition objects, or None to clear all commands.
2273 """
2274 with self._command_handlers_lock:
2275 self._command_handlers.clear()
2276 if not commands:
2277 return
2278 for cmd in commands:
2279 self._command_handlers[cmd.name] = cmd.handler
2280
2281 def _register_bearer_token_providers(
2282 self, providers: dict[str, BearerTokenProvider] | None

Callers 2

_initialize_sessionMethod · 0.95
resume_sessionMethod · 0.95

Calls 1

clearMethod · 0.45

Tested by

no test coverage detected