fix(hooks): pass input.agent parameter to keyword detector

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)
This commit is contained in:
YeonGyu-Kim
2026-01-05 16:26:35 +09:00
parent 6913613398
commit 5a4261a607
2 changed files with 2 additions and 2 deletions

View File

@@ -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) {

View File

@@ -21,7 +21,7 @@ export function createKeywordDetectorHook(ctx: PluginInput) {
}
): Promise<void> => {
const promptText = extractPromptText(output.parts)
const detectedKeywords = detectKeywordsWithType(removeCodeBlocks(promptText))
const detectedKeywords = detectKeywordsWithType(removeCodeBlocks(promptText), input.agent)
if (detectedKeywords.length === 0) {
return