You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+13-1Lines changed: 13 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -257,6 +257,8 @@ require('opencode').setup({
257
257
hooks= {
258
258
on_file_edited=nil, -- Called after a file is edited by opencode.
259
259
on_session_loaded=nil, -- Called after a session is loaded.
260
+
on_done_thinking=nil, -- Called when opencode finishes thinking (all jobs complete).
261
+
on_permission_requested=nil, -- Called when a permission request is issued.
260
262
},
261
263
})
262
264
```
@@ -591,12 +593,14 @@ The plugin defines several highlight groups that can be customized to match your
591
593
592
594
The `prompt_guard` configuration option allows you to control when prompts can be sent to Opencode. This is useful for preventing accidental or unauthorized AI interactions in certain contexts.
593
595
594
-
## 🪝Custom user hooks
596
+
## 🪝Custom user hooks
595
597
596
598
You can define custom functions to be called at specific events in Opencode:
597
599
598
600
-`on_file_edited`: Called after a file is edited by Opencode.
599
601
-`on_session_loaded`: Called after a session is loaded.
602
+
-`on_done_thinking`: Called when Opencode finishes thinking (all user jobs complete).
603
+
-`on_permission_requested`: Called when a permission request is issued.
0 commit comments