Skip to content
This repository was archived by the owner on Apr 1, 2026. It is now read-only.

Commit d6bf475

Browse files
authored
docs: Improving Plugin Documentation - Adding Events (anomalyco#4438)
1 parent f22580e commit d6bf475

1 file changed

Lines changed: 66 additions & 0 deletions

File tree

packages/web/src/content/docs/plugins.mdx

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,72 @@ export const MyPlugin: Plugin = async ({ project, client, $, directory, worktree
6161

6262
---
6363

64+
### Events
65+
66+
Plugins can subscribe to events as seen below in the Examples section. Here is a list of the different events available.
67+
68+
#### Command Events
69+
70+
- `command.executed`
71+
72+
#### File Events
73+
74+
- `file.edited`
75+
- `file.watcher.updated`
76+
77+
#### Installation Events
78+
79+
- `installation.updated`
80+
81+
#### LSP Events
82+
83+
- `lsp.client.diagnostics`
84+
- `lsp.updated`
85+
86+
#### Message Events
87+
88+
- `message.part.removed`
89+
- `message.part.updated`
90+
- `message.removed`
91+
- `message.updated`
92+
93+
#### Permission Events
94+
95+
- `permission.replied`
96+
- `permission.updated`
97+
98+
#### Server Events
99+
100+
- `server.connected`
101+
102+
#### Session Events
103+
104+
- `session.created`
105+
- `session.compacted`
106+
- `session.deleted`
107+
- `session.diff`
108+
- `session.error`
109+
- `session.idle`
110+
- `session.status`
111+
- `session.updated`
112+
113+
#### Todo Events
114+
115+
- `todo.updated`
116+
117+
#### Tool Events
118+
119+
- `tool.execute.after`
120+
- `tool.execute.before`
121+
122+
#### TUI Events
123+
124+
- `tui.prompt.append`
125+
- `tui.command.execute`
126+
- `tui.toast.show`
127+
128+
---
129+
64130
## Examples
65131

66132
Here are some examples of plugins you can use to extend opencode.

0 commit comments

Comments
 (0)