fix: respect disabled_hooks for keyword-detector in claude-code-hooks (#562)
* fix: respect disabled_hooks for keyword-detector in claude-code-hooks The keyword detection in claude-code-hooks was running regardless of whether keyword-detector was in disabled_hooks. This caused analyze and search modes to trigger even when explicitly disabled. Pass keywordDetectorDisabled flag to createClaudeCodeHooksHook and skip keyword detection when the hook is disabled. Fixes #530 * refactor: restore keyword types in log output Add types array back to keyword detection log for better observability
This commit is contained in:
@@ -122,6 +122,7 @@ const OhMyOpenCodePlugin: Plugin = async (ctx) => {
|
||||
const thinkMode = isHookEnabled("think-mode") ? createThinkModeHook() : null;
|
||||
const claudeCodeHooks = createClaudeCodeHooksHook(ctx, {
|
||||
disabledHooks: (pluginConfig.claude_code?.hooks ?? true) ? undefined : true,
|
||||
keywordDetectorDisabled: !isHookEnabled("keyword-detector"),
|
||||
});
|
||||
const anthropicContextWindowLimitRecovery = isHookEnabled(
|
||||
"anthropic-context-window-limit-recovery"
|
||||
|
||||
Reference in New Issue
Block a user