fix(tui): reopen autocomplete after backspace deletes space #6031
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
When typing
/or@, autocomplete shows suggestions.If you press space by mistake, the dropdown closes.
When you press backspace to remove the space, autocomplete does not come back, even though the text is valid again.
Steps to Reproduce
/something→ autocomplete appearsFix
Updated the
onInputlogic to reopen autocomplete when the cursor is back in a valid position.For
/Autocomplete reopens when the text starts with
/and there is no space before the cursorFor
@Finds the closest
@before the cursor and reopens autocomplete if there is no space between@and the cursorTesting
/something→ space → backspace → autocomplete reopens@agent→ space → backspace → autocomplete reopenstest/pathdoes not trigger/autocompleteScreen.Recording.2025-12-23.at.6.31.46.PM.mov
Screen.Recording.2025-12-23.at.6.33.38.PM.mov