fix: Slash Command Autocomplete vs. Auto-Execute Fix (#2257)#2275
Open
yunus25jmi1 wants to merge 1 commit intodocker:mainfrom
Open
fix: Slash Command Autocomplete vs. Auto-Execute Fix (#2257)#2275yunus25jmi1 wants to merge 1 commit intodocker:mainfrom
yunus25jmi1 wants to merge 1 commit intodocker:mainfrom
Conversation
I have successfully implemented a root-cause fix for the issue where pressing Tab to autocomplete a slash command would immediately execute it instead of just completing the text. Root Cause Analysis: In pkg/tui/components/completion/completion.go, both Enter and Tab were bound to the same key binding, causing auto-submit completions (like slash commands) to execute immediately upon selection with either key. Solution Implemented: - Separate Tab and Enter key bindings in completion.go. - Tab now autocompletes text only (AutoExecute=false). - Enter executes the command (AutoExecute=true). - Updated editor.go to handle the AutoExecute flag. - Added comprehensive tests in pkg/tui/components/completion/autocomplete_test.go. Verification: - pkg/tui/components/completion tests: 6/6 PASS - pkg/tui/components/editor tests: PASS - Successful build of project and binary Fixes docker#2257
a5614de to
68994bd
Compare
Contributor
|
@yunus25jmi1 does it fix the the call of a skill with a slash command (#1819)? |
Contributor
Author
Yes, this is going to resolve the Issue #1819 |
c7a7fd8 to
0030b96
Compare
This was referenced Apr 4, 2026
0030b96 to
68994bd
Compare
Contributor
Author
Contributor
Author
|
Hi @dgageot and maintainers, I noticed that PR #2325 by @joshbarrington also addresses issues #2257 and #1819 with a different implementation approach. This PR takes a simpler route by removing AutoComplete from the command interface and driving behavior directly through the Update function. Since both PRs aim to fix the same issues, could you please clarify which direction you'd prefer to proceed with? I'm happy to close #2275 in favor of #2325 if that's the preferred approach, or I can update my PR if needed. Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
I have successfully implemented a root-cause fix for the issue where pressing Tab to autocomplete a slash command would immediately execute it instead of just completing the text.
Root Cause Analysis:
In pkg/tui/components/completion/completion.go, both Enter and Tab were bound to the same key binding, causing auto-submit completions (like slash commands) to execute immediately upon selection with either key.
Solution Implemented:
Verification:
Fixes #2257