Skip to content

Commit a63423d

Browse files
fix(examples): use UserPromptSubmit in hooks example callback output
Align add_custom_instructions hookEventName with the UserPromptSubmit matcher and UserPromptSubmitHookSpecificOutput. Made-with: Cursor
1 parent e10b11c commit a63423d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

examples/hooks.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,10 @@ async def check_bash_command(
7373
async def add_custom_instructions(
7474
input_data: HookInput, tool_use_id: str | None, context: HookContext
7575
) -> HookJSONOutput:
76-
"""Add custom instructions when a session starts."""
76+
"""Add custom context when the user submits a prompt."""
7777
return {
7878
"hookSpecificOutput": {
79-
"hookEventName": "SessionStart",
79+
"hookEventName": "UserPromptSubmit",
8080
"additionalContext": "My favorite color is hot pink",
8181
}
8282
}

0 commit comments

Comments
 (0)