summaryrefslogtreecommitdiffhomepage
path: root/packages/web/src
diff options
context:
space:
mode:
authorJay V <[email protected]>2025-08-06 13:51:47 -0400
committerJay V <[email protected]>2025-08-06 13:51:47 -0400
commitd9edd6818fa59d572ea32e7a3fa470b53fcfa5f0 (patch)
treee45fc8de00afb8f58f0bbc3f98a19ebd84d8c535 /packages/web/src
parent4217286b729ca3b2159ac19ca9e3ccf2d2e271ae (diff)
downloadopencode-d9edd6818fa59d572ea32e7a3fa470b53fcfa5f0.tar.gz
opencode-d9edd6818fa59d572ea32e7a3fa470b53fcfa5f0.zip
docs: add undo to tutorial
Diffstat (limited to 'packages/web/src')
-rw-r--r--packages/web/src/content/docs/docs/index.mdx36
1 files changed, 36 insertions, 0 deletions
diff --git a/packages/web/src/content/docs/docs/index.mdx b/packages/web/src/content/docs/docs/index.mdx
index bcc7148a2..fd193ffd7 100644
--- a/packages/web/src/content/docs/docs/index.mdx
+++ b/packages/web/src/content/docs/docs/index.mdx
@@ -249,6 +249,42 @@ changes.
---
+### Undo changes
+
+Let's say you ask opencode to makes some changes.
+
+```txt frame="none"
+Can you refator the function in @packages/functions/src/api/index.ts?
+```
+
+But you realize that it is not what you wanted. You **can undo** the changes
+using the `/undo` command.
+
+```bash frame="none"
+/undo
+```
+
+opencode will now revert the changes you made and show your original message
+again.
+
+```txt frame="none"
+Can you refator the function in @packages/functions/src/api/index.ts?
+```
+
+From here you can tweak the prompt and ask opencode to try again.
+
+:::tip
+You can run `/undo` multiple times to undo multiple changes.
+:::
+
+Or you **can redo** the changes using the `/redo` command.
+
+```bash frame="none"
+/redo
+```
+
+---
+
## Share
The conversations that you have with opencode can be [shared with your