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
@@ -287,6 +287,10 @@ The plugin provides the following actions that can be triggered via keymaps, com
287
287
| Revert current file changes last prompt |`<leader>ort`|`:OpencodeRevertThisLastPrompt`|`require('opencode.api').diff_revert_this_last_prompt()`|
288
288
| Revert all file changes since last session |`<leader>orA`|`:OpencodeRevertAllSession`|`require('opencode.api').diff_revert_all_session()`**Not implemented yet**|
289
289
| Revert current file changes last session |`<leader>orT`|`:OpencodeRevertThisSession`|`require('opencode.api').diff_revert_this_session()`**Not implemented yet**|
290
+
| Revert all files to a specific snapshot | - |`:OpencodeRevertAllToSnapshot`|`require('opencode.api').diff_revert_all(snapshot_id)`|
291
+
| Revert current file to a specific snapshot | - |`:OpencodeRevertThisToSnapshot`|`require('opencode.api').diff_revert_this(snapshot_id)`|
292
+
| Restore a file to a restore point | - |`:OpencodeRestoreSnapshotFile`|`require('opencode.api').diff_restore_snapshot_file(restore_point_id)`|
293
+
| Restore all files to a restore point | - |`:OpencodeRestoreSnapshotAll`|`require('opencode.api').diff_restore_snapshot_all(restore_point_id)`|
You can pass additional options when running a prompt via command or API:
@@ -371,20 +382,36 @@ You can create custom agents through your opencode config file. Each agent can h
371
382
372
383
See [Opencode Agents Documentation](https://opencode.ai/docs/agents/) for full configuration options.
373
384
374
-
## User Commands
385
+
## User Commands and Slash Commands
386
+
387
+
You can run predefined user commands and built-in slash commands from the input window by typing `/`. This opens a command picker where you can select a command to execute. The output of the command will be included in your prompt context.
388
+
389
+
**Built-in slash commands** include:
375
390
376
-
You can run predefined user commands from the input window by typing `/`. This will open a command picker where you can select a command to execute. The output of the command will be included in your prompt context.
391
+
-`/share` — Share the current session and get a link
392
+
-`/unshare` — Unshare the current session
393
+
-`/compact` — Compact (summarize) the current session
394
+
-`/undo` — Undo the last opencode action
395
+
-`/redo` — Redo the last undone action
396
+
-`/init` — Initialize/update AGENTS.md
397
+
-`/help` — Show help
398
+
-`/mcp` — Show MCP servers
399
+
-`/models` — Switch provider/model
400
+
-`/sessions` — Switch session
401
+
-`/child-sessions` — Switch to a child session
402
+
-`/agent` — Switch agent/mode
403
+
- ...and more
377
404
378
-
To configure user commands
405
+
**User commands** are custom scripts you define. They are loaded from:
379
406
380
-
### Store command files in these locations:
407
+
-`.opencode/command/` (project-specific)
408
+
-`command/` (global, in config directory)
381
409
382
-
`.opencode/command/` - Project-specific commands
383
-
`command/` - Global commands in config directory
410
+
You can also run user commands by name with `:OpencodeRunUserCommand <name>` or `/run_user_command <name>`.
0 commit comments