Skip to content

Commit 9ab9bc5

Browse files
committed
feat(commands): add input_clear
sometimes nice to have
1 parent 1661a97 commit 9ab9bc5

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ Send a [command](https://opencode.ai/docs/keybinds):
147147
| `messages_copy` | Copy the last message in the session |
148148
| `messages_undo` | Undo the last message in the session |
149149
| `messages_redo` | Redo the last message in the session |
150+
| `input_clear` | Clear the TUI input |
150151
| `agent_cycle` | Cycle the selected agent |
151152
152153
> Supports *all* commandsthese are just the most useful ones.

lua/opencode.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ end
9797
---| 'messages_copy'
9898
---| 'messages_undo'
9999
---| 'messages_redo'
100+
---| 'input_clear'
100101
---| 'agent_cycle'
101102

102103
---Send a [command](https://opencode.ai/docs/keybinds) to `opencode`.
@@ -121,6 +122,7 @@ function M.command(command, callback)
121122
{ name = "Copy last message", command = "messages_copy" },
122123
{ name = "Undo last message", command = "messages_undo" },
123124
{ name = "Redo last message", command = "messages_redo" },
125+
{ name = "Clear input", command = "input_clear" },
124126
{ name = "Cycle agent", command = "agent_cycle" },
125127
}, {
126128
prompt = "Command opencode: ",

0 commit comments

Comments
 (0)