diff options
| author | Eric Juden <[email protected]> | 2025-11-18 16:23:46 -0600 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-11-18 16:23:46 -0600 |
| commit | d6bf475749d71c569b34989c0f6213622e69847f (patch) | |
| tree | d19f3f4938da81e6bc42a5d10cae2632f758dd84 | |
| parent | f22580e9433df40636e653e55461ec0fba98d971 (diff) | |
| download | opencode-d6bf475749d71c569b34989c0f6213622e69847f.tar.gz opencode-d6bf475749d71c569b34989c0f6213622e69847f.zip | |
docs: Improving Plugin Documentation - Adding Events (#4438)
| -rw-r--r-- | packages/web/src/content/docs/plugins.mdx | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/packages/web/src/content/docs/plugins.mdx b/packages/web/src/content/docs/plugins.mdx index fe1ae9bfd..95c4d3947 100644 --- a/packages/web/src/content/docs/plugins.mdx +++ b/packages/web/src/content/docs/plugins.mdx @@ -61,6 +61,72 @@ export const MyPlugin: Plugin = async ({ project, client, $, directory, worktree --- +### Events + +Plugins can subscribe to events as seen below in the Examples section. Here is a list of the different events available. + +#### Command Events + +- `command.executed` + +#### File Events + +- `file.edited` +- `file.watcher.updated` + +#### Installation Events + +- `installation.updated` + +#### LSP Events + +- `lsp.client.diagnostics` +- `lsp.updated` + +#### Message Events + +- `message.part.removed` +- `message.part.updated` +- `message.removed` +- `message.updated` + +#### Permission Events + +- `permission.replied` +- `permission.updated` + +#### Server Events + +- `server.connected` + +#### Session Events + +- `session.created` +- `session.compacted` +- `session.deleted` +- `session.diff` +- `session.error` +- `session.idle` +- `session.status` +- `session.updated` + +#### Todo Events + +- `todo.updated` + +#### Tool Events + +- `tool.execute.after` +- `tool.execute.before` + +#### TUI Events + +- `tui.prompt.append` +- `tui.command.execute` +- `tui.toast.show` + +--- + ## Examples Here are some examples of plugins you can use to extend opencode. |
