Pressing tab on a half completed command doesn't complete the command #2389

Closed
opened 2026-02-16 17:35:26 -05:00 by yindo · 5 comments
Owner

Originally created by @AKTheKnight on GitHub (Oct 31, 2025).

Originally assigned to: @thdxr on GitHub.

Description

I'm unsure if this is a bug or intentional, but it feels different compared to pre 1.0.0

Pre 1.0.0: Typing /mod and pressing tab would open the model window

1.0.0: Typing /mod and pressing tab just changes the agent mode

OpenCode version

1.0.0

Steps to reproduce

Type /mod and press tab. Your agent mode will be changed and not your command completed

Screenshot and/or share link

No response

Operating System

Ubuntu 20.04

Terminal

Windows Terminal

Originally created by @AKTheKnight on GitHub (Oct 31, 2025). Originally assigned to: @thdxr on GitHub. ### Description I'm unsure if this is a bug or intentional, but it feels different compared to pre 1.0.0 Pre 1.0.0: Typing /mod and pressing tab would open the model window 1.0.0: Typing /mod and pressing tab just changes the agent mode ### OpenCode version 1.0.0 ### Steps to reproduce Type /mod and press tab. Your agent mode will be changed and not your command completed ### Screenshot and/or share link _No response_ ### Operating System Ubuntu 20.04 ### Terminal Windows Terminal
yindo added the opentuibug labels 2026-02-16 17:35:26 -05:00
yindo closed this issue 2026-02-16 17:35:26 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Oct 31, 2025):

This issue might be a duplicate of existing issues. Please check:

  • #3482: Fix command autocomplete to match commands instead of categories - This issue describes similar problems with command autocomplete behavior where commands don't match as expected

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Oct 31, 2025): This issue might be a duplicate of existing issues. Please check: - #3482: Fix command autocomplete to match commands instead of categories - This issue describes similar problems with command autocomplete behavior where commands don't match as expected Feel free to ignore if none of these address your specific case.
Author
Owner

@thdxr commented on GitHub (Oct 31, 2025):

hm yeah right now tab is captured by cycle agent, bit tricky to have autocomplete here override it need to think about this

enter works though

@thdxr commented on GitHub (Oct 31, 2025): hm yeah right now tab is captured by cycle agent, bit tricky to have autocomplete here override it need to think about this `enter` works though
Author
Owner

@AKTheKnight commented on GitHub (Oct 31, 2025):

1.0.2 said Added tab key support for selecting autocomplete options in the TUI but it still doesn't seem to be working for me in 1.0.2

@AKTheKnight commented on GitHub (Oct 31, 2025): 1.0.2 said `Added tab key support for selecting autocomplete options in the TUI` but it still doesn't seem to be working for me in 1.0.2
Author
Owner

@veracioux commented on GitHub (Oct 31, 2025):

@thdxr An idea that I toyed around with a bit: how about adding anonymous commands to command.register() with some kind of keybind property of type Keybind.Info. Then modify https://github.com/veracioux/opencode/blob/3823d8d50ef5b0fd0d9a4d7ce034b79a4c508b17/packages/opencode/src/cli/cmd/tui/component/dialog-command.tsx#L28 to .reverse() the items (because items added later are likely more "specific")

Then you could do command.register([{keybind: { name: "tab", ctrl: false, ... }, onSelect() { autocomplete() }]).

I can see wider applicability of this also.

@veracioux commented on GitHub (Oct 31, 2025): @thdxr An idea that I toyed around with a bit: how about adding anonymous commands to command.register() with some kind of `keybind` property of type `Keybind.Info`. Then modify https://github.com/veracioux/opencode/blob/3823d8d50ef5b0fd0d9a4d7ce034b79a4c508b17/packages/opencode/src/cli/cmd/tui/component/dialog-command.tsx#L28 to `.reverse()` the items (because items added later are likely more "specific") Then you could do `command.register([{keybind: { name: "tab", ctrl: false, ... }, onSelect() { autocomplete() }])`. I can see wider applicability of this also.
Author
Owner

@thdxr commented on GitHub (Oct 31, 2025):

oh i fixed it a different way but that's a good idea. i'll refactor later

@thdxr commented on GitHub (Oct 31, 2025): oh i fixed it a different way but that's a good idea. i'll refactor later
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2389