move enable/disable to hooksConfig

This commit is contained in:
DennisYu07 2026-03-02 23:57:12 -08:00
parent 4a44eb7a17
commit 7cde98e238
3 changed files with 29 additions and 11 deletions

View file

@ -1034,8 +1034,9 @@ export async function loadCliConfig(
format: outputSettingsFormat,
},
hooks: settings.hooks,
hooksConfig: settings.hooksConfig,
enableHooks:
argv.experimentalHooks === true || settings.hooks?.enabled === true,
argv.experimentalHooks === true || settings.hooksConfig?.enabled === true,
channel: argv.channel,
// Precedence: explicit CLI flag > settings file > default(true).
// NOTE: do NOT set a yargs default for `chat-recording`, otherwise argv will