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
@@ -259,6 +259,8 @@ require('opencode').setup({
259
259
hooks= {
260
260
on_file_edited=nil, -- Called after a file is edited by opencode.
261
261
on_session_loaded=nil, -- Called after a session is loaded.
262
+
on_done_thinking=nil, -- Called when opencode finishes thinking (all jobs complete).
263
+
on_permission_requested=nil, -- Called when a permission request is issued.
262
264
},
263
265
})
264
266
```
@@ -594,12 +596,14 @@ The plugin defines several highlight groups that can be customized to match your
594
596
595
597
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.
596
598
597
-
## 🪝Custom user hooks
599
+
## 🪝Custom user hooks
598
600
599
601
You can define custom functions to be called at specific events in Opencode:
600
602
601
603
-`on_file_edited`: Called after a file is edited by Opencode.
602
604
-`on_session_loaded`: Called after a session is loaded.
605
+
-`on_done_thinking`: Called when Opencode finishes thinking (all user jobs complete).
606
+
-`on_permission_requested`: Called when a permission request is issued.
0 commit comments