aboutsummaryrefslogtreecommitdiffstats
path: root/hooks/nvim-notify.hook.sh
Commit message (Collapse)AuthorAgeFilesLines
* feat(hooks): unify payload dumps into one generic hookThomas Vanbesien5 days1-4/+4
| | | | | | | | | | | Replace the three near-identical dump scripts with a single dump.hook.sh that derives both target dir and filename from the payload: dir from hook_event_name (trailing `failure` stripped so the two post events share posttooluse), id from tool_use_id else session_id-source/reason. This adds SessionEnd for free, so register the hook (and the notifier) on SessionEnd too, and extend the notifier's id fallback to reason.
* feat(hooks): notify $NVIM of state dumpsThomas Vanbesien5 days1-0/+38
Add nvim-notify.hook.sh, a generic hook that tells the Neovim instance owning the terminal ($NVIM) that a state dump is available, by firing a `User Claude<Event>` autocmd whose `data` is the dump's basename. The signal is derived from the payload, so the one script serves every event it is registered against: `hook_event_name` becomes the pattern, and `tool_use_id` (else `session_id-source`) becomes the `data`, matching how the dump hooks name their files. It is a no-op outside a Neovim terminal or without an identifier, and the remote call is backgrounded with a timeout so a slow or absent editor never blocks a tool call. Register it after each dump hook on SessionStart, PreToolUse (Bash), PostToolUse (Bash), and PostToolUseFailure (Bash).