Register command handlers for this session. Args: commands: A list of CommandDefinition objects, or None to clear all commands.
(self, commands: list[CommandDefinition] | None)
| 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 |
no test coverage detected