从 RuntimeConfig 加载。源码: hooks.rs:61-63
(cls, config)
| 97 | |
| 98 | @classmethod |
| 99 | def from_config(cls, config) -> "HookRunner": |
| 100 | """从 RuntimeConfig 加载。源码: hooks.rs:61-63""" |
| 101 | return cls( |
| 102 | pre_tool_use=config.hooks_pre(), |
| 103 | post_tool_use=config.hooks_post(), |
| 104 | ) |
| 105 | |
| 106 | def run_pre_tool_use(self, tool_name: str, tool_input: str) -> HookResult: |
| 107 | """执行所有 PreToolUse hook。源码: hooks.rs:66-75""" |
nothing calls this directly
no test coverage detected