feat(hooks): Add a hooks.enabled setting. (#15933)

This commit is contained in:
joshualitt
2026-01-06 13:33:37 -08:00
committed by GitHub
parent c31f05356a
commit 56092bd782
13 changed files with 79 additions and 101 deletions

View File

@@ -1129,10 +1129,10 @@
"type": "number"
},
"enableHooks": {
"title": "Enable Hooks System",
"description": "Enable the hooks system for intercepting and customizing Gemini CLI behavior. When enabled, hooks configured in settings will execute at appropriate lifecycle events (BeforeTool, AfterTool, BeforeModel, etc.). Requires MessageBus integration.",
"markdownDescription": "Enable the hooks system for intercepting and customizing Gemini CLI behavior. When enabled, hooks configured in settings will execute at appropriate lifecycle events (BeforeTool, AfterTool, BeforeModel, etc.). Requires MessageBus integration.\n\n- Category: `Advanced`\n- Requires restart: `yes`\n- Default: `false`",
"default": false,
"title": "Enable Hooks System (Experimental)",
"description": "Enables the hooks system experiment. When disabled, the hooks system is completely deactivated regardless of other settings.",
"markdownDescription": "Enables the hooks system experiment. When disabled, the hooks system is completely deactivated regardless of other settings.\n\n- Category: `Advanced`\n- Requires restart: `yes`\n- Default: `true`",
"default": true,
"type": "boolean"
}
},
@@ -1502,6 +1502,13 @@
"default": {},
"type": "object",
"properties": {
"enabled": {
"title": "Enable Hooks",
"description": "Canonical toggle for the hooks system. When disabled, no hooks will be executed.",
"markdownDescription": "Canonical toggle for the hooks system. When disabled, no hooks will be executed.\n\n- Category: `Advanced`\n- Requires restart: `no`\n- Default: `false`",
"default": false,
"type": "boolean"
},
"disabled": {
"title": "Disabled Hooks",
"description": "List of hook names (commands) that should be disabled. Hooks in this list will not execute even if configured.",