MCPcopy Create free account
hub / github.com/Louisym/MiniCC / from_config

Method from_config

mini_claude_code/hooks.py:99–104  ·  view source on GitHub ↗

从 RuntimeConfig 加载。源码: hooks.rs:61-63

(cls, config)

Source from the content-addressed store, hash-verified

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"""

Callers

nothing calls this directly

Calls 2

hooks_preMethod · 0.80
hooks_postMethod · 0.80

Tested by

no test coverage detected