From 5a4261a6078ef80483514a094a95685ce748ec24 Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Mon, 5 Jan 2026 16:26:35 +0900 Subject: [PATCH] fix(hooks): pass input.agent parameter to keyword detector MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Wire agent information through keyword detector hooks: - Pass input.agent to detectKeywordsWithType in keyword-detector hook - Pass input.agent to detectKeywordsWithType in claude-code-hooks - Enables agent-aware ultrawork message generation 🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode) --- src/hooks/claude-code-hooks/index.ts | 2 +- src/hooks/keyword-detector/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hooks/claude-code-hooks/index.ts b/src/hooks/claude-code-hooks/index.ts index 9f84639..acfc3ee 100644 --- a/src/hooks/claude-code-hooks/index.ts +++ b/src/hooks/claude-code-hooks/index.ts @@ -138,7 +138,7 @@ export function createClaudeCodeHooksHook(ctx: PluginInput, config: PluginConfig return } - const detectedKeywords = detectKeywordsWithType(removeCodeBlocks(prompt)) + const detectedKeywords = detectKeywordsWithType(removeCodeBlocks(prompt), input.agent) const keywordMessages = detectedKeywords.map((k) => k.message) if (keywordMessages.length > 0) { diff --git a/src/hooks/keyword-detector/index.ts b/src/hooks/keyword-detector/index.ts index 13a4c22..462fd39 100644 --- a/src/hooks/keyword-detector/index.ts +++ b/src/hooks/keyword-detector/index.ts @@ -21,7 +21,7 @@ export function createKeywordDetectorHook(ctx: PluginInput) { } ): Promise => { const promptText = extractPromptText(output.parts) - const detectedKeywords = detectKeywordsWithType(removeCodeBlocks(promptText)) + const detectedKeywords = detectKeywordsWithType(removeCodeBlocks(promptText), input.agent) if (detectedKeywords.length === 0) { return