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:
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user