Register hook handlers for session lifecycle events. Hooks allow custom logic to be executed at various points during the session lifecycle (before/after tool use, session start/end, etc.). Note: This method is internal. Hooks are typically registered
(self, hooks: SessionHooks | None)
| 2600 | self._transform_callbacks = callbacks |
| 2601 | |
| 2602 | def _register_hooks(self, hooks: SessionHooks | None) -> None: |
| 2603 | """ |
| 2604 | Register hook handlers for session lifecycle events. |
| 2605 | |
| 2606 | Hooks allow custom logic to be executed at various points during |
| 2607 | the session lifecycle (before/after tool use, session start/end, etc.). |
| 2608 | |
| 2609 | Note: |
| 2610 | This method is internal. Hooks are typically registered |
| 2611 | when creating a session via :meth:`CopilotClient.create_session`. |
| 2612 | |
| 2613 | Args: |
| 2614 | hooks: The hooks configuration object, or None to remove all hooks. |
| 2615 | """ |
| 2616 | with self._hooks_lock: |
| 2617 | self._hooks = hooks |
| 2618 | |
| 2619 | async def _handle_system_message_transform( |
| 2620 | self, sections: dict[str, dict[str, str]] |
no outgoing calls
no test coverage detected